fix(renovate): no 'workflow' scope on Forgejo; self-diagnose token #6
No reviewers
Labels
No labels
dependencies
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
alex/pi-shared!6
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/renovate-token-scopes-diag"
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?
Closes #1 (final piece) / continues #5
The two questions from #1 (comment)
1. "
workflowis not available as option" — correct, it doesn't existForgejo/Gitea has no
workflowscope. That scope is GitHub-only. The earlier instruction in #5 ("create a PAT with scopesissue, repository, workflow") was copy-pasted from GitHub's PAT requirements, so it asked for something the Forgejo UI can't offer. That's why you can't find it — and you don't need it.On Forgejo, Renovate needs exactly two scopes:
write:repositorywrite:issue2. "Still rejected — how to troubleshoot?"
The previous run (#10) failed before this was diagnosed (the agent hit a 429). Three likely causes, in order:
RENOVATE_TOKENrepo secret (Settings → Actions → Secrets), or copied it with a stray space/newline.read:repository/read:issueinstead ofwrite:.|| github.tokenfallback) resolves to theforgejo-actionsbot, which can't own PRs.Manual check with your PAT (run anywhere):
write:repository+write:issue.What this PR changes
Replaces the validate step with a self-diagnosing version so the next failure names the exact cause instead of Renovate's opaque
Authentication failure:write:repository+write:issue, noworkflow);forgejo-actionsghost → "needs a PAT for a real account";401/403⇒ fatal "read-only" error, anything else ⇒ non-fatal warning.All messages drop the bogus
workflowscope. Validated: YAML parses,bash -npasses, and running the step with the ghost token correctly stops at check (2) with the right message (and never mutates anything).Forgejo/Gitea has no 'workflow' scope (GitHub-only), so the previous instructions told users to select a scope that doesn't exist. Renovate only needs write:repository + write:issue on Forgejo. Make the 'Validate Renovate token' step self-diagnosing so failures point at the exact cause instead of Renovate's opaque 'Authentication failure': (1) secret empty/unset -> tell exactly which scopes to use (2) authenticates as the forgejo-actions ghost -> needs a real user PAT (3) read-only PAT (write:repository missing) -> create+delete a probe branch; 403/401 = fatal read-only error, else non-fatal warning Ref #1Pull request closed