bump.yml: a missing commitizen-bot grant on a private repo surfaces as a bare git 128, not a permissions error #25
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?
What happens
bump.yml's checkout takes the bot PAT whenever Infisical resolves it:REPOSITORY_ACCESS_TOKENis thecommitizen-botPAT from/forgejo-users/commitizen-bot. It wins the||, so thegithub.tokenfallback never applies in practice. On a private repo wherecommitizen-botis not a collaborator, the bot cannot see the repo at all and the fetch dies:Retried at 10s and 16s, then the job fails.
Why the message misleads
"Repository not found" reads as a typo in the repo name, and the repo plainly exists — every other job in the same run checked it out seconds earlier using the default Actions token. Nothing in the failure names the actual cause, which is that the bot lacks read access.
Observed on
gravityfargo/pyvikunjarun 4609, jobbump-version. Grantingcommitizen-botwrite on the repo fixed it.Suggested fix
When
REPOSITORY_ACCESS_TOKENis set and the checkout 404s, fail with a named error saying the bot is not a collaborator on the repo, rather than letting the bare git 128 through. A pre-checkout probe against the repo endpoint with the bot token would catch it before the retries.Related
gravityfargo/templatesissue #38 covered the documentation half —common-versioning/TEMPLATE.mdnow names the grant as an adoption prerequisite for private repos (templates e2cf1b6). This issue is the diagnostic half.