File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 7272 --search "$SEARCH" --json number -q '.[0].number')
7373 if [ -n "$PR" ]; then
7474 CI_STATUS=$(gh pr view "$PR" --repo "$REPO" \
75- --json statusCheckRollup -q \
76- '[.statusCheckRollup | group_by(.name) | map(sort_by(.startedAt) | last | .conclusion) | if length == 0 then "pending" elif all(. == "SUCCESS") then "success" elif any(. == null or . == "") then "pending" else "failure" end][-1]')
75+ --json statusCheckRollup -q '
76+ .statusCheckRollup | map(
77+ if .__typename == "CheckRun" then .conclusion
78+ elif .__typename == "StatusContext" then .state
79+ else null end
80+ ) | if length == 0 then "pending"
81+ elif any(. == null or . == "" or . == "IN_PROGRESS" or . == "QUEUED" or . == "WAITING" or . == "PENDING") then "pending"
82+ elif all(. == "SUCCESS") then "success"
83+ else "failure" end')
7784 echo "CI status: ${CI_STATUS}"
7885 if [ "$CI_STATUS" = "success" ]; then
7986 echo "CI passed, merging PR #${PR}..."
You can’t perform that action at this time.
0 commit comments