Skip to content

fix(gh): CI state from newest run per check - #160

Merged
noamsto merged 1 commit into
mainfrom
feat/159-ci-state-from-newest-run-per-check
Oct 4, 2026
Merged

noamsto merged 1 commit into
mainfrom
feat/159-ci-state-from-newest-run-per-check

Conversation

@noamsto

@noamsto noamsto commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Closes #159

Summary

PR.CIState() iterated the raw StatusCheckRollup, so a superseded
CANCELLED run of a check on the same head commit marked the PR "fail" even
though Checks() (newest run per check) was all green. It now computes over
p.Checks(), matching the deduped view the rest of the UI uses.

The related dedup-key question from the issue (keying Checks() on workflow
name + check name instead of check name alone) is left for a separate change —
it alters which checks are distinct and how they render, a product decision
beyond this fix. A note was left on the issue.

Testing

  • go test ./internal/gh/ -run TestCIState — new superseded cancel is ignored case red before the fix, green after.
  • go test ./..., go vet ./..., golangci-lint run ./..., nilaway -include-pkgs=github.com/noamsto/prdash ./... — all pass.

CIState iterated the raw StatusCheckRollup, so a superseded CANCELLED run
of a check on the same head commit still marked the PR failing even when
Checks() (newest run per check) was all green. Compute it over Checks().

Refs #159
@noamsto
noamsto merged commit 02665b3 into main Oct 4, 2026
1 check passed
@noamsto
noamsto deleted the feat/159-ci-state-from-newest-run-per-check branch October 4, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI state reports fail when a superseded run on the same commit was cancelled

1 participant