Repository navigation
fix(vig-utils): render commit statuses in the gh-issues PR table - #1545
Merged
Merged
Conversation
Key the rollup dedup on name-or-context and classify each entry on a normalized conclusion-or-state verdict, so commit statuses stop collapsing into one "?" bucket and a red one renders failed instead of pending. Same two fixes the release CI gates took in #1522 and #1538; CheckRun entries render unchanged. Refs: #1544
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #1544 (combined follow-up from #1542, the display-table analogue of the #1538/#1541 gate fix): the
just gh-issuesPR table was blind to StatusContexts in two ways —_dedupe_status_checksgrouped onnameonly (every commit status collapsed into one"?"bucket, only the newest surviving), and_format_ci_statusclassified onconclusiononly (a red commit status rendered pending, a green one never counted as passed).Two helpers in the style of #1542's
_started, each mirroring the gates' jq exactly:_check_key=name or context or "?"— dedup grouping and the red cell's failed-names list both use it, so a failing commit status is now also named in the cell (bonus fix: the oldc.get("name", "?")returnedNonefor present-but-null names)._verdict=conclusion or state or ""— pass/fail tallies classify on it; pending stays the remainder, so PENDING/EXPECTED/in-flight all fall through with no new branch, and skipped/neutral/cancelled CheckRuns render exactly as before.Same-keyed grouping matches the gates including tie behavior (Python
>=keeps the later element, as jq'smax_byreturns the last maximal element). One #1542 fixture corrected to a realistic node shape (StatusContexts carrycontext, nevername); its behavioral pin is unchanged.Display-only — no gate behavior changes.
Test plan
Two new dedup tests (distinct StatusContexts stay separate; same-keyed StatusContext/CheckRun grouping matching #1541's gate test) and a new
TestFormatCiStatusCommitStatusesclass (FAILURE/ERROR render failed, SUCCESS counts passed, PENDING/EXPECTED render pending, red status beats green checks). TDD red: 6 failed pre-fix (e.g. astate: FAILUREcontext rendering⏳ 0/1yellow); the PENDING/EXPECTED cases and all pre-existing CheckRun-only tests were green throughout as regression pins.packages/vig-utils/tests: 537 passed;prek run --all-filesexit 0 (verified independently of the implementation run).Closes #1544