ci: point the CLA action at a branch that exists - #39
Merged
Conversation
The `cla` check has been failing on every open PR (#34, #36, #37, #38): ##[error]Could not retrieve repository contents. Status: 404 cla-assistant/github-action defaults `branch` to 'master'. This repo's default branch is `main` and no `master` ref exists, so the action's first call — octokit.repos.getContent({ path: pathToSignatures, ref: getBranch() }) — asks for a signature file on a ref that isn't there and 404s before it can do anything. Nothing was ever broken about the PRs themselves. Three fixes: - branch: 'main' so the ref resolves. `path-to-signatures` is also pinned explicitly rather than relying on the action's default, since the pair only makes sense read together. - contents: write. The action commits the signature file when someone signs; with contents:read it would 403 on the write immediately after the read started succeeding, trading one failure for another. - Drop `path-to-cla-assistants`, which is not an input this action accepts and was logged as `Unexpected input(s)` on every run. Note that `license/cla` (the cla-assistant.io status check) has been passing throughout — only the GitHub Action was failing, so signature enforcement was never actually bypassed. Signatures will land on `main` as `signatures/cla.json`. That triggers CI and Release on each new signer; semantic-release no-ops on a non-conventional commit, and new signers are rare. If that noise ever matters, the alternative is a dedicated `cla-signatures` branch — which has to exist first, or it reproduces this exact bug.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
onamfc
force-pushed
the
brandon/fix-cla-workflow-branch
branch
from
August 11, 2026 19:03
10e1b95 to
1581a9e
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
The
clacheck fails on every open PR — #34, #36, #37 and #38 — and has been for as long as the workflow has existed:Nothing is wrong with the PRs.
cla-assistant/github-actiondefaults itsbranchinput tomaster, this repo's default branch ismain, and nomasterref exists. The action's first call asks for the signature file on that missing ref:so it 404s before doing anything else. The run log confirms the defaults it was using:
Changes
1.
branch: 'main'— so the ref resolves.path-to-signaturesis now pinned explicitly too, since the two inputs only make sense read together and the pair is what a future reader needs to see.2.
contents: write— the same module writes the signature file when someone signs:With
contents: readthis would have 403'd on the write the moment the read started working, so fixing only the branch would have traded one failure for another.3. Removed
path-to-cla-assistants— not an input this action accepts. It was logged on every run as:Verification
The action's
action.ymlconfirms the defaults and the valid input list:Checked against this repo:
masterref exists?mainand feature branchessignatures/cla.jsononmain?mainbranch protectionCLA_ASSISTANT_PATsecretThat last row is worth stating:
getPATOctokit()is only reached whenremote-repository-name/remote-organization-nameare set. Neither is, so this runs onGITHUB_TOKENand the permissions block above is what actually governs it.Two things to note
This PR cannot prove itself green.
pull_request_targetruns the workflow definition from the base branch, not the PR head — so theclacheck here still executesmain's broken copy and will still fail. That's expected. The fix takes effect on the first PR opened after this merges.Signature commits land on
main. Each new signer produces asignatures/cla.jsoncommit, which triggers CI and Release. semantic-release no-ops on a non-conventional commit message and new signers are rare, so this is noise rather than a problem. If it ever does matter, the alternative is a dedicatedcla-signaturesbranch — but that branch has to be created first, or it reproduces exactly the bug this PR fixes.Scope
Not a functional change and not related to #35 — split out from #38 deliberately so the redirect fix isn't carrying a CI change.
license/cla(the cla-assistant.io status check) has been passing throughout, so signature enforcement was never actually bypassed; only the Action half was broken.