We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 064dc96 + 1721113 commit aaff3f1Copy full SHA for aaff3f1
.github/workflows/automerge.yml
@@ -0,0 +1,23 @@
1
+name: Dependabot and Pre-commit auto-merge
2
+
3
+on:
4
+ pull_request:
5
6
+permissions:
7
+ contents: write
8
+ pull-requests: write # Needed if in a private repository
9
10
+jobs:
11
+ auto-merge:
12
+ runs-on: ubuntu-latest
13
+ if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
14
+ steps:
15
+ - name: Enable auto-merge for Dependabot and pre-commit-ci PRs
16
+ run: |
17
+ gh pr review --approve "$PR_URL"
18
+ gh pr merge --auto --merge "$PR_URL"
19
+ env:
20
+ PR_URL: ${{ github.event.pull_request.html_url }}
21
+ # GitHub provides this variable in the CI env. You don't
22
+ # need to add anything to the secrets vault.
23
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0 commit comments