File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 8888 echo "Waiting for PR to be mergeable..."
8989 for i in {1..30}; do
9090 MERGEABLE=$(gh pr view ${{ steps.create-pull-request.outputs.pull-request-url }} --json mergeable --jq .mergeable)
91- echo "MERGEABLE = $MERGEABLE"
91+ echo "mergeable = $MERGEABLE"
9292 if [[ "$MERGEABLE" == "MERGEABLE" || "$MERGEABLE" == "mergeable" ]]; then
9393 break
9494 fi
9898 env :
9999 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100100
101+ - name : Wait for PR checks to succeed
102+ run : |
103+ echo "Waiting for all status checks to pass..."
104+ for i in {1..30}; do
105+ STATES=$(gh pr view ${{ steps.create-pull-request.outputs.pull-request-url }} --json statusCheckRollup --jq '[.statusCheckRollup[].state]' || echo "[]")
106+ echo "statusCheckRollup states = $STATES"
107+ if echo "$STATES" | jq -e 'all(. == "SUCCESS")' > /dev/null; then
108+ echo "All checks passed."
109+ break
110+ fi
111+ echo "Checks not successful yet, retrying in 10s... ($i/30)"
112+ sleep 10
113+ done
114+ env :
115+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
116+
101117 - name : Enable automerge
102118 uses : " peter-evans/enable-pull-request-automerge@v3"
103119 with :
You can’t perform that action at this time.
0 commit comments