bump.yml checkout: the REPOSITORY_ACCESS_TOKEN fallback only fires on an empty variable, so a valid-but-unauthorized bot token breaks any repo the bot cannot reach #24
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The problem
.forgejo/workflows/bump.yml:67-70checks out with:The comment above it states the intent:
||returns the right operand only when the left is falsy. So "outside the org the default token applies" holds only whenREPOSITORY_ACCESS_TOKENis empty — that is, when Infisical is unreachable or unconfigured for the caller. It does not hold for the case that actually matters: Infisical resolves fine, the variable is populated with a perfectly validcommitizen-botPAT, and that account simply has no access to the calling repo. The intended fallback never engages, and checkout fails instead.Observed
gravityfargo/mcp-vikunja— private, personal namespace — adoptedcommon-versioning+common-versioning-pythonfrom the templates repo and merged tomain.Run https://code.modernleft.org/gravityfargo/mcp-vikunja/actions/runs/5 (run id 4320), job 6216
Bump version and changelog with commitizen.The Infisical step succeeded:
Checkout then failed three times with retries, and the job ended there:
The sibling jobs in the same run —
test(6211) andcode-quality(6213) — checked out the same commit successfully, because they use the default job token, which is scoped to the repo being built. That contrast is what isolates the cause to the token, not to the repo or the runner.commitizen-botwas not a collaborator on the repo. Forgejo answers "Repository not found" rather than 403 for a private repo a credential cannot see, which is why the error names nothing useful.Scope
Every repo in the templates
ADOPTERS.mdcarryingcommon-versioningis under theModernLeftorg, where the bot is presumably a member, so nothing has hit this before. Any adopter in a personal namespace, or any private repo the bot is not a collaborator on, hits it on the first push tomainafter adopting — i.e. the failure is discovered by breakingmain, sincebuild-version.ymlhas noworkflow_dispatchand cannot be exercised beforehand.Note that read access is not sufficient to fix it in general:
bump.yml:106pushes the branch and tag, so the bot needs write.Workaround applied
commitizen-botadded as a write collaborator ongravityfargo/mcp-vikunja. Not yet re-verified by a run, because the workflow is push-triggered only.Options
github.tokenwhen it fails, which is what the comment already promises.use-bot-tokendefaulting totrue, so an out-of-org caller opts out rather than discovering the constraint from a checkout failure.Assert signing key materializedstep.common-versioning/TEMPLATE.md: adopting the layer requirescommitizen-botto have write on the repo. Worth doing regardless of which of the above lands, and it belongs next to the existing note about needing an initial tag.