Skip to content

Commit 59598b6

Browse files
Create dependabot-auto-merge.yaml (#63)
Signed-off-by: Mathieu Benoit <[email protected]>
1 parent a1bf787 commit 59598b6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
jobs:
7+
dependabot-auto-merge:
8+
runs-on: ubuntu-latest
9+
if: ${{ github.actor == 'dependabot[bot]' && !github.event.pull_request.auto_merge }}
10+
steps:
11+
- name: Approve a PR
12+
run: gh pr review --approve "$PR_URL"
13+
env:
14+
PR_URL: ${{github.event.pull_request.html_url}}
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
- name: Enable auto-merge for Dependabot PRs
17+
run: gh pr merge --auto --squash "$PR_URL"
18+
env:
19+
PR_URL: ${{github.event.pull_request.html_url}}
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)