fix(ci): keep the CLA job inert until CLA_SIGNATURES_TOKEN is set - #213
Merged
Conversation
The CLA workflow landed with #211 before its prerequisite secret existed, so the "CLA Assistant" check failed on every pull request — the action cannot write the signature file without the token. With no branch protection requiring the check, that is noise rather than a gate. Guard the step on the token being present. The secrets context is not available in an if expression, so the secret is lifted to a job-level env var, which is. Once the secret is added the job starts working with no further change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015aZ5qHYBsde5ysgUrRmbwD
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 CLA workflow merged in #211 before the secret it depends on existed, so
the "CLA Assistant" check has been failing on every pull request since —
contributor-assistant/github-actioncannot write the signature file withoutCLA_SIGNATURES_TOKEN. #201 and #203 both merged with that check red.Since nothing requires the check (branch protection needs the repo to be
public or Pro), a permanently-red check is noise, not a gate — and a check
that is always red teaches you to ignore it, which is worse than not having it.
This guards the step on the token being present, so the job is inert until the
secret is added and starts working the moment it is, with no further edit.
Implementation note: the
secretscontext is not available in anifexpression —
actionlintrejects it — so the secret is lifted to a job-levelenvvar, which is available.Follow-ups this does not do
CLA_SIGNATURES_TOKENitself (needs a PAT withcontents: write).main— needs branch protection.contributor-assistant/github-actionto a commit SHA rather than the@v2.6.1tag. For apull_request_targetworkflow holdingcontents: write,that is the safer habit.
Verification
actionlintclean on all workflows (and it is what caught the first attemptat this fix).