Skip to content

Commit 2e169e8

Browse files
committed
Fix: Approve bot PRs before enabling auto-merge
The workflow to auto-merge dependabot PRs is currently not working. We need an approving review for all PRs, so without it the bot PRs just stay open forever.
1 parent c51d9cf commit 2e169e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/auto-merge.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ jobs:
1313
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
1414
steps:
1515
- name: Enable auto-merge for Dependabot PRs
16-
run: gh pr merge --auto --merge "$PR_URL"
16+
run: |
17+
gh pr review --approve "$PR_URL"
18+
gh pr merge --auto --merge "$PR_URL"
1719
env:
1820
PR_URL: ${{github.event.pull_request.html_url}}
1921
# GitHub provides this variable in the CI env. You don't

0 commit comments

Comments
 (0)