File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
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 :
1+ name : Auto-merge bot PRs
2+ on : pull_request
53
64permissions :
75 contents : write
@@ -10,12 +8,18 @@ permissions:
108jobs :
119 auto-merge :
1210 runs-on : ubuntu-latest
13- if : ${{ github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
11+ if : >
12+ github.repository == 'pytask-dev/pytask' &&
13+ (github.event.pull_request.user.login == 'dependabot[bot]' ||
14+ github.event.pull_request.user.login == 'pre-commit-ci[bot]')
1415 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"
16+ - name : Approve PR
17+ run : gh pr review --approve "$PR_URL"
18+ env :
19+ PR_URL : ${{ github.event.pull_request.html_url }}
20+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
21+ - name : Enable auto-merge
22+ run : gh pr merge --auto --merge "$PR_URL"
1923 env :
2024 PR_URL : ${{ github.event.pull_request.html_url }}
21- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments