add required approval and merge instead of mark as auto merge

This commit is contained in:
burnettk 2024-02-05 10:32:44 -05:00
parent 01acc1944c
commit 655151c85a
No known key found for this signature in database
1 changed files with 9 additions and 2 deletions

View File

@ -73,7 +73,14 @@ jobs:
- name: print pr number - name: print pr number
run: cat pr_number run: cat pr_number
- name: actually merge it # the repo requires one approval. if a dependabot change passes tests, that is good enough.
run: gh pr merge --auto --merge "$(cat pr_number)" - name: approve pr
run: gh pr review --approve "$(cat pr_number)"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# if the merge --auto flag were added, and if the repo allowed it at https://github.com/sartography/spiff-arena/settings,
# it would set up the pr to auto merge when all requirements were met. but we just want to merge now.
- name: set up pr to auto merge when all requirements are met
run: gh pr merge --squash "$(cat pr_number)"
env: env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}