Repository navigation
fix(ci): make cla-check work for fork PRs - #1224
Merged
Merged
Conversation
The CLA gate relied on a manually POSTed commit status (context 'CLA Check'). Fork PRs always run workflows with a read-only GITHUB_TOKEN regardless of declared permissions, so the status step always failed with 403 on forks — every external fork PR was permanently red even with a signed CLA (verified: PR #1221, run 34481899319, POST /statuses -> 403 while signed='true'). The bot comment step also 403s on forks (skipped in the same run). - Drop the commit-status step and the statuses:write permission; the gate now rides on this job's own Actions check run (created by GitHub itself, immune to the fork token restriction). - Keep the signed->green / unsigned->red semantics via the existing 'Fail if not signed' step, now with a ::error annotation pointing to the signing portal and the auto-refresh behavior. - Keep the PR comment as a same-repo-only courtesy step (continue-on-error) — it can never affect the gate outcome. Note: the ruleset's required context must switch from 'CLA Check' to 'cla-check' (case-sensitive) in the same window as this lands; owner action via API.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
cla-check.ymlno longer POSTs a commit status (contextCLA Check); the CLA gate now rides on the job's own Actions check run (cla-check)statuses: writepermissioncontinue-on-error(best effort)::errorannotation with the portal link and auto-refresh infoWhy
Fork PRs always run workflows with a read-only
GITHUB_TOKEN, regardless of declaredpermissions. The old design gated CLA on a manually POSTed commit status, so every external fork PR failed the status step with 403 — permanently red even with a signed CLA. Empirical evidence from today: PR #1221 (fork by @KazamiHazaki), run 34481899319:signed='true'yetPOST /repos/codecoradev/uteke/statuses/... -> 403 Resource not accessible by integration; the comment step was skipped with zero bot comments on the PR (REST-verified).The native Actions check run is created by GitHub itself and is not subject to the fork token restriction, making it the correct carrier for the gate. Semantics are unchanged: signed → green, unsigned → red with an explanatory annotation.
Testing
createCommitStatus, nostatuses: write, comment step conditioned +continue-on-error, gate step untouched semantics)signatures.jsonfrom.github@main:KazamiHazaki→signed=true, unknown user →signed=falsecargo check,cargo clippy, workspace tests,cargo fmt --check(pre-commit gates, all green; cora review passed)develop-protectedrequired context swapsCLA Check→cla-check(case-sensitive) via API, then an E2E synthetic PR validates the new gateNotes for reviewers
Until the ruleset swap lands, new PRs will show a red/pending
CLA Checkmissing context — expected transitional state; this PR itself may show it. Sequence: merge this → ruleset swap → E2E validation.