Treat code scanning ruleset checks as required - #194
Merged
Conversation
Pull request dashboard statusMerged · refreshed 2026-07-30 12:41 UTC Status above doesn't look right?
|
Contributor
There was a problem hiding this comment.
Pull request overview
Treats code-scanning ruleset checks as merge-blocking dashboard checks.
Changes:
- Parses branch rules for required checks and code-scanning tools.
- Classifies neutral code-scanning results as failures.
- Adds tests and documentation for the behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pull-request-dashboard/README.md |
Documents code-scanning routing. |
.github/scripts/pull-request-dashboard/test_github_cli.py |
Tests rule parsing and check classification. |
.github/scripts/pull-request-dashboard/test_dashboard.py |
Updates dashboard mocks. |
.github/scripts/pull-request-dashboard/test_author_nudge.py |
Updates author-nudge mocks. |
.github/scripts/pull-request-dashboard/RATIONALE.md |
Explains the merge-blocking behavior. |
.github/scripts/pull-request-dashboard/github_cli.py |
Implements code-scanning check discovery. |
.github/scripts/pull-request-dashboard/dashboard.py |
Clarifies CI field documentation. |
Comments suppressed due to low confidence (1)
.github/scripts/pull-request-dashboard/github_cli.py:433
- The unconditional
continuealso removes checks from this app from the existing required/non-blocking pipeline. IfCodeQLis configured as arequired_status_checkscontext, it is omitted fromcheck_rollup["required"], soinclude_missing_required_checksadds a permanent pending placeholder despite the check having reported; a matchingnon_blocking_check_patternsentry is similarly ignored. Preserve normal classification while additionally identifying code-scanning-rule checks, with deduplication when both rule types apply.
if app.get("databaseId") == CODE_SCANNING_APP_ID:
code_scanning.append(normalize_check(node))
continue
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mx-psi
approved these changes
Jul 30, 2026
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.
A
code_scanningruleset rule holds the merge on a check that the code scanning app publishes for each configured tool, named after that tool, and GitHub never marks that check as required. The dashboard dropped it along with every other non-required check, so a pull request could sit in Waiting on reviewers with no CI failure reported while its merge was actually held. Seen on open-telemetry/opentelemetry-java-instrumentation#19286, where theCodeQLcheck was neutral withError when processing the SARIF file.Those checks are now matched by the code scanning app and by the tool names in the rule, then treated as required. Their
NEUTRALconclusion means the alerts introduced by the pull request could not be determined, which also holds the merge, so it is reported as failing rather than skipped. Tools with no such check are not reported, because GitHub expects results only from the tool configurations that actually ran.This costs no additional API requests. The checks already arrive in the status check rollup, and the effective branch rules were already fetched for required status check contexts, so
gh_required_check_contextsis split into agh_branch_rulesfetch plus pure parsers that both rule types share.