ci: skip SonarQube/Stryker on Dependabot PRs (secrets withheld)#66
Merged
Conversation
GitHub withholds repository secrets from Dependabot-triggered workflow runs, so the SonarQube scan (SONAR_TOKEN) and Stryker dashboard reporter (STRYKER_DASHBOARD_API_KEY) hard-fail on every Dependabot PR — the browser-mutation job went red on #64 and #65. The existing guard only excluded fork PRs, but Dependabot branches live in the same repo, so they slipped through. Exclude `github.actor == 'dependabot[bot]'` from both steps. The vitest suite still runs (so any future npm-dependency Dependabot PR is still gated on tests), and mutation-testing a dependency bump added no signal anyway. Co-Authored-By: Claude Opus 4.8 (1M context) <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.



Fixes the red
browser-mutationjob on Dependabot PRs (seen on #64 and #65).Root cause
GitHub runs Dependabot-triggered workflows with repository secrets withheld (a security measure). So:
SONAR_TOKENempty) → step fails.dashboardreporter enabled, which needsSTRYKER_DASHBOARD_API_KEY→ fails next once Sonar is skipped.The previous guard only excluded fork PRs (
head.repo.full_name == github.repository), but Dependabot branches live in the same repo, so they passed the guard and then failed for lack of a token.These checks weren't required/gating, so #64 and #65 merged anyway — but they left a red X and burned CI minutes on every Dependabot run.
Fix
Exclude
github.actor == 'dependabot[bot]'from both secret-dependent steps:if:— addgithub.actor != 'dependabot[bot]' && (…).if: github.actor != 'dependabot[bot]'.The
npm ci+ vitest steps still run on Dependabot PRs, so a future npm-dependency bump is still gated on the JS test suite; only the two steps that can't work without secrets are skipped. No change to push /workflow_dispatch/ normal-PR behavior.🤖 Generated with Claude Code