Skip to content

Commit a536d7f

Browse files
committed
Revert "fix: show running CI as 🟡 when non-required checks still in progress"
This reverts commit f014cca.
1 parent f014cca commit a536d7f

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

bin/gs-stack-status

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -430,21 +430,25 @@ if [[ -n "$repo_owner" && ${#pr_number_to_branch[@]} -gt 0 ]]; then
430430
else $valid
431431
end) as $filtered |
432432
433-
# any_running: use ALL checks (not just filtered/required) so
434-
# non-required in-progress checks keep overall status as pending
435-
(([$valid[] | select(
436-
(.status != null and .status != "COMPLETED") or
437-
(.cState != null and (.cState | IN("PENDING", "EXPECTED")))
438-
)] | length) > 0) as $any_running |
439-
# Failed: only from filtered (required) checks
433+
# CheckRun nodes: running if status exists and != COMPLETED
434+
($filtered | map(select(
435+
.status != null and .status != "COMPLETED"
436+
)) | length) as $cr_running |
437+
# CheckRun nodes: failed conclusions
440438
($filtered | map(select(
441439
.conclusion != null and
442440
(.conclusion | IN("FAILURE", "TIMED_OUT", "ERROR", "STARTUP_FAILURE", "ACTION_REQUIRED"))
443441
)) | length) as $cr_failed |
442+
# StatusContext nodes: running (PENDING/EXPECTED)
443+
($filtered | map(select(
444+
.cState != null and (.cState | IN("PENDING", "EXPECTED"))
445+
)) | length) as $sc_running |
446+
# StatusContext nodes: failed
444447
($filtered | map(select(
445448
.cState != null and (.cState | IN("FAILURE", "ERROR"))
446449
)) | length) as $sc_failed |
447450
451+
(($cr_running + $sc_running) > 0) as $any_running |
448452
(($cr_failed + $sc_failed) > 0) as $any_failed |
449453
450454
if $any_running and $any_failed then

0 commit comments

Comments
 (0)