Skip to content

Commit

Permalink
ci: Add PR existence verification before auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mattevans committed Jan 13, 2025
1 parent 479fd60 commit 773143d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/update-contributoor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ jobs:
- name: Auto-merge if tests pass
if: steps.cpr.outputs.pull-request-operation == 'created'
run: |
# Wait a bit for GitHub to register the PR and start checks
echo "Waiting for GitHub to register the PR..."
sleep 15
# Verify PR exists
if ! gh pr view "${{ steps.cpr.outputs.pull-request-url }}" &>/dev/null; then
echo "PR not found: ${{ steps.cpr.outputs.pull-request-url }}"
exit 1
fi
# Wait for checks to complete (timeout after 15 minutes)
echo "Waiting for checks to complete..."
timeout 15m gh pr checks "${{ steps.cpr.outputs.pull-request-url }}" --watch
Expand Down

0 comments on commit 773143d

Please sign in to comment.