File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
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 }}
You can’t perform that action at this time.
0 commit comments