Skip to content

Commit

Permalink
handle edge case closing PR in case merge fails due to conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui authored and p4u committed Nov 22, 2023
1 parent 1550ead commit cb565a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/verify-contribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ jobs:
- name: Merge PR branch
if: success() && contains(github.event.pull_request.title, 'Contribution:')
run: |
gh pr merge --admin --squash "$PR_URL"
gh pr merge --admin --squash "$PR_URL" \
|| gh pr close -c "Failed, likely another contribution was merged concurrently and yours was lost, please restart your contribution from scratch" "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit cb565a2

Please sign in to comment.