fix(github): hold non-required third-party action_required checks instead of auto-closing - #4423
Merged
Merged
Conversation
…tead of auto-closing (#4414) A completed action_required check-run from a third-party app was treated as a hard CI failure regardless of whether it was an actual branch-protection required context. Superagent posts "Contributor trust" alongside its own required "Superagent Security Scan" check, but "Contributor trust" itself is never required -- so real contributor PRs were auto-closed on a signal branch protection never asked for. reduceLiveCiAggregate now only hard-fails a third-party action_required check when isRequired() confirms it's an actual required context. A non-required one is routed to the existing nonRequiredFailingDetails bucket instead -- never flipping ciState/blocking merge, but still rendered under its own "Flagged checks (non-blocking)" section in the PR comment so it's never silently dropped either.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4423 +/- ##
=======================================
Coverage 93.98% 93.98%
=======================================
Files 406 406
Lines 36993 37017 +24
Branches 13521 13532 +11
=======================================
+ Hits 34767 34791 +24
Misses 1570 1570
Partials 656 656
🚀 New features to boost your workflow:
|
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
action_requiredcheck-run from a third-party GitHub App was treated as a settled CI failure regardless of whether it was an actual branch-protection required context. Superagent posts a "Contributor trust" check-run alongside its own, separately-required "Superagent Security Scan" check -- but "Contributor trust" itself was never a required context. Real contributor PRs were getting auto-closed citing "CI is failing (Contributor trust)" even though branch protection never required that check.reduceLiveCiAggregate(src/github/backfill.ts) now only hard-fails a third-partyaction_requiredcheck whenisRequired(name)confirms it actually is a required context. A non-required one is routed to the existing (previously always-empty)nonRequiredFailingDetailsbucket -- it never flipsciStateor blocks merge, but it's also never silently dropped: it renders under its own "Flagged checks (non-blocking)" collapsible section in the PR comment (src/review/unified-comment.ts), wired throughsrc/queue/processors.ts's existingMergeReadinessconstruction.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) -- owner-authored maintenance/incident fix, relates to feat(gate): configurable advisory check-runs so a non-resolving external status never blocks or stalls the gate forever #4372 without closing it (the full config-driven system it describes isn't built here).Validation
git diff --checknpm run typechecknpm run test:coveragelocally (full unsharded run, 12,507 tests passed); 100% branch coverage confirmed on every changed line across the 3 touchedsrc/**filesnpm audit --audit-level=moderate(0 vulnerabilities)npm run test:ci(full local gate, exit 0)test/unit/backfill.test.ts(required vs. non-required third-partyaction_required, with/without summary+detailsUrl),test/unit/unified-comment.test.ts(render + verbosity + angle-escaping + blank-name filtering), andtest/unit/queue.test.ts(two full webhook-processing end-to-end tests: a flagged-with-detail case and a bare no-output case)Safety
Notes
gh apibefore this PR: JSONbored/gittensory's branch protection required contexts are["Superagent Security Scan", "validate"]-- "Contributor trust" is a separate, never-required check-run posted by the same app, confirming this is the exact real-world shape the fix targets.