Skip to content

Commit e5eee2f

Browse files
committed
feat: add auto-merge for dependabot PRs
1 parent 3ad787e commit e5eee2f

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Auto-merge dependabot PRs
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
check_suite:
7+
types: [completed]
8+
9+
jobs:
10+
auto-merge:
11+
runs-on: ubuntu-latest
12+
if: github.actor == 'dependabot[bot]'
13+
14+
steps:
15+
- name: Enable auto-merge for dependabot PRs
16+
run: |
17+
gh pr merge --auto --squash --delete-branch "$PR_URL"
18+
env:
19+
PR_URL: ${{ github.event.pull_request.html_url }}
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)