Skip to content

Commit 7a32024

Browse files
geekypunkclaude
andcommitted
fix(ci): drop the CodeQL visibility guard that blocked every merge
`if: github.event.repository.visibility == 'public'` sat on a matrix job. A job-level `if:` is evaluated before the matrix expands, so every skipped run reported one check under the raw template name, `analyze (${{ matrix.language }})`, instead of `analyze (java-kotlin)` and `analyze (javascript-typescript)`. While the repository was private that phantom name was the only CodeQL check anyone had seen, so it was pinned as a required status check in the `Protect main branch` ruleset. When the repository went public the job began running for real and reporting the two expanded names, leaving the required phantom with nothing to report it. Every pull request then stalled on "Expected — waiting for status to be reported": unmergeable, and with no failing job to point at, indistinguishable from CI being stuck. The guard has served its purpose — the repository is public and code scanning is free, which is the condition its own comment named for deleting it. The replacement comment records the failure mode so the `if:` is not reintroduced, and says to fix a future private repository in the ruleset instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 471e17e commit 7a32024

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ jobs:
1818
analyze:
1919
name: analyze (${{ matrix.language }})
2020
runs-on: ubuntu-latest
21-
# Code scanning is free on public repositories; on a private one it requires
22-
# GitHub Advanced Security, which this organisation's free plan does not
23-
# include. Without this guard every run fails with a 403 until the repository
24-
# is public, and a permanently red workflow trains people to stop reading CI.
25-
# DELETE THIS LINE once the repository is public — from then on a failure
26-
# here is a real finding rather than a billing state.
27-
if: github.event.repository.visibility == 'public'
21+
# No visibility guard here, deliberately. A job-level `if:` is evaluated
22+
# before the matrix expands, so a skipped run reports a single check under
23+
# the raw template name — `analyze (${{ matrix.language }})` — rather than
24+
# the two expanded names. That phantom name reached the `Protect main branch`
25+
# ruleset as a required check (GitHub's suggestion list offers whatever was
26+
# last reported), and once this repository went public and the job began
27+
# reporting the real names instead, nothing was left to satisfy the phantom:
28+
# every pull request stalled on "Expected — waiting for status to be
29+
# reported", unmergeable, with no failing job to point at.
30+
#
31+
# Code scanning is free while this repository is public. If it ever goes
32+
# private without GitHub Advanced Security, drop these contexts from the
33+
# ruleset — do not reintroduce an `if:` here.
2834
permissions:
2935
# Required to upload results to the code-scanning API.
3036
security-events: write

0 commit comments

Comments
 (0)