Skip to content

Commit

Permalink
chore: Switch generator pull request management to auto-approve (#11451)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Jul 25, 2024
1 parent 158dd7f commit 18b266a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/auto-approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
processes:
- "RubyApiaryCodegen"
1 change: 0 additions & 1 deletion .github/workflows/dailly-generate-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
APPROVAL_GITHUB_TOKEN: ${{secrets.YOSHI_APPROVER_TOKEN}}
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/generate-updates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
runs-on: ubuntu-20.04
env:
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
APPROVAL_GITHUB_TOKEN: ${{secrets.YOSHI_APPROVER_TOKEN}}
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down
5 changes: 3 additions & 2 deletions .toys/generate-updates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ def handle_package api_name, index, total
puts "(#{index}/#{total}) Pull request already exists for #{api_name}", :yellow
return
end
approval_message = "Rubber-stamped client auto-generation!"
approval_message = approval_token ? "Rubber-stamped client auto-generation!" : nil
labels = approval_token ? ["automerge: exact"] : nil
result = yoshi_pr_generator.capture enabled: !git_remote.nil?,
remote: git_remote,
branch_name: branch_name,
commit_message: commit_message,
labels: ["automerge"],
labels: labels,
cooldown_wait: 15,
auto_approve: approval_message,
approval_token: approval_token do
Expand Down

0 comments on commit 18b266a

Please sign in to comment.