File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 11name : Dependabot pull requests
22
3- on :
4- workflow_run :
5- workflows : ["Linting"]
6- types :
7- - completed
3+ on : pull_request
84
95jobs :
106 dependabot :
117 name : Auto-merge Dependabot PRs
128 runs-on : ubuntu-latest
13- # Only trigger if tests have passed on a Dependabot-created PR
14- if : |
15- github.event.workflow_run.conclusion == 'success' &&
16- github.event.workflow_run.pull_requests != '' &&
17- startsWith(github.event.workflow_run.head_branch, 'dependabot/') &&
18- github.event.workflow_run.pull_requests[0].user.login == 'dependabot[bot]'
9+ if : ${{github.event.pull_request.user.login == 'dependabot[bot]'}}
1910 permissions :
2011 pull-requests : write
2112 contents : write
2213 env :
2314 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24- PR_URL : ${{ github.event.workflow_run.pull_requests[0] .html_url }}
15+ PR_URL : ${{ github.event.pull_request .html_url }}
2516 steps :
17+ - name : Approve the PR
18+ run : gh pr review --approve "$PR_URL"
2619 - name : Merge the PR
2720 run : gh pr merge --squash --auto "$PR_URL"
You can’t perform that action at this time.
0 commit comments