Skip to content

Commit 35b6c80

Browse files
committed
Update check run status:
1 parent 3bca096 commit 35b6c80

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/_conda-forge-package-release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,15 @@ jobs:
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}..."

0 commit comments

Comments
 (0)