fix(ci): give CodeQL its required check names on a docs-only change - #46
Merged
Merged
Conversation
The documentation filter skipped the whole analyze job, and a skipped
matrix job never expands its name. GitHub then registers one check called
literally "Analyze ${{ matrix.language }}", while the ruleset requires
"Analyze java-kotlin" and "Analyze actions" — names that never appear, so
their requirement can never be met and the pull request stays BLOCKED.
detect-changes.yml explains the mechanism it relies on ("A job skipped by
an if condition does report Success"), and that is true — for the quality
gate, whose job name is a constant. The matrix case was never exercised:
every earlier documentation change carried a non-prose file alongside
(.gitignore in #33), so the filter answered "code" and the full gate ran.
#45, a single .md, is the first pull request to reach the skipped path,
and it cannot be merged at all.
The filter now gates the steps instead. The job starts, the matrix
expands, both checks get their real names, every step is skipped and the
job passes in a few seconds.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The defect
A documentation-only pull request cannot be merged. #45 (one
.mdfile) isBLOCKEDwith no way forward:detect-changes.ymlskips the analysers when a change is prose only, and relies on a skipped job reporting its check as passed. That holds forquality, whose job name is a constant. It does not hold for the CodeQL matrix: a skipped matrix job never expands${{ matrix.language }}, so GitHub registers a single check under the literal, uninterpolated name, and the two names the ruleset requires never appear. A requirement that cannot appear can never be met.Why it surfaced only now
Every earlier documentation change carried a non-prose file alongside — #33 added
.gitignorenext to seven.mdfiles, so the filter answered "code changed" and the full gate ran. #45 is the first pull request in the repository to be prose and nothing else, and therefore the first to reach the skipped path.The fix
Move the filter from the job to its steps. The job starts, the matrix expands, both checks get their real names, all three steps are skipped, and the job concludes successfully in a few seconds. Cost is one short runner per language on documentation-only changes; the analysis itself still never runs on prose.
Verification
This pull request touches
.yml, so it takes the code path and the full gate runs on it. The docs-only path is proven by #45: once this merges, its checks re-run and it should become mergeable.🤖 Generated with Claude Code