File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1- name : Dependabot auto-merge
1+ name : Automerge PRs (dependabot and pre-commit)
22on : pull_request
33
44permissions :
@@ -8,7 +8,6 @@ permissions:
88jobs :
99 dependabot :
1010 runs-on : ubuntu-latest
11- # Only run this workflow for branches starting with "dependabot/"
1211 if : startsWith(github.head_ref, 'dependabot/')
1312 steps :
1413 - name : Dependabot metadata
2928 env :
3029 PR_URL : ${{github.event.pull_request.html_url}}
3130 GH_TOKEN : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
31+
32+ pre-commit :
33+ runs-on : ubuntu-latest
34+ if : startsWith(github.head_ref, 'pre-commit-ci-update-config')
35+ steps :
36+ - name : Assign PR to pyansys-ci-bot
37+ run : gh pr edit --assignee pyansys-ci-bot "$PR_URL"
38+ env :
39+ PR_URL : ${{github.event.pull_request.html_url}}
40+ GH_TOKEN : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
41+
42+ - name : Approve a PR
43+ run : gh pr review --approve "$PR_URL"
44+ env :
45+ PR_URL : ${{github.event.pull_request.html_url}}
46+ GH_TOKEN : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
47+
48+ - name : Enable auto-merge
49+ run : gh pr merge --auto --squash "$PR_URL"
50+ env :
51+ PR_URL : ${{github.event.pull_request.html_url}}
52+ GH_TOKEN : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
Original file line number Diff line number Diff line change 1+ automerge pre-commit.ci PRs
You can’t perform that action at this time.
0 commit comments