Document the token scopes Forgejo v15 actually requires #2

Merged
daniel merged 1 commit from fix/token-scopes into main 2026-11-07 19:08:17 +00:00
Collaborator

Creating a personal repository failed against a real v15 server with
"403 token does not have at least one of required scope(s): [write:user]".
POST /user/repos sits in the /user route group, so it needs write:user in
addition to write:repository. The scopes are now taken from the
tokenRequiresScopes gates in v15's routers/api/v1/api.go and listed per
command in the README and fgj auth login --help.

Also stop pr create --label from aborting when the token lacks
read:organization: a 403 on the organisation-label fallback is treated
like a 404, so repository labels still work and an org-only label is
reported as unknown.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

🤖 Generated with Claude Code

Creating a personal repository failed against a real v15 server with "403 token does not have at least one of required scope(s): [write:user]". POST /user/repos sits in the /user route group, so it needs write:user in addition to write:repository. The scopes are now taken from the tokenRequiresScopes gates in v15's routers/api/v1/api.go and listed per command in the README and `fgj auth login --help`. Also stop `pr create --label` from aborting when the token lacks read:organization: a 403 on the organisation-label fallback is treated like a 404, so repository labels still work and an org-only label is reported as unknown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Creating a personal repository failed against a real v15 server with
"403 token does not have at least one of required scope(s): [write:user]".
POST /user/repos sits in the /user route group, so it needs write:user in
addition to write:repository. The scopes are now taken from the
tokenRequiresScopes gates in v15's routers/api/v1/api.go and listed per
command in the README and `fgj auth login --help`.

Also stop `pr create --label` from aborting when the token lacks
read:organization: a 403 on the organisation-label fallback is treated
like a 404, so repository labels still work and an org-only label is
reported as unknown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
daniel merged commit 7e4f945605 into main 2026-11-07 19:08:17 +00:00
daniel deleted branch fix/token-scopes 2026-11-07 19:08:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
daniel/Forgejo-CLI!2
No description provided.