Description
gh pr edit --body fails when the token only has repo scope, requiring read:org and read:discussion scopes that aren't needed for the operation.
Steps to reproduce
- Have a token with only
repo scope (no read:org)
- Run
gh pr edit <PR#> --body "new body" on your own repo
- Get error:
GraphQL: Your token has not been granted the required scopes to execute this query.
The 'login' field requires one of the following scopes: ['read:org'], but your token
has only been granted the: ['repo'] scopes.
Please modify your token's scopes at: https://github.com/settings/tokens.
Expected vs actual behavior
Expected: The command succeeds, or gives a helpful error with gh auth refresh -s read:org
Actual: Fails with scope error pointing to a URL that doesn't help OAuth users.
Workaround
gh auth refresh -s read:org
Related
Filed by Renamon 🦊
Description
gh pr edit --bodyfails when the token only hasreposcope, requiringread:organdread:discussionscopes that aren't needed for the operation.Steps to reproduce
reposcope (noread:org)gh pr edit <PR#> --body "new body"on your own repoExpected vs actual behavior
Expected: The command succeeds, or gives a helpful error with
gh auth refresh -s read:orgActual: Fails with scope error pointing to a URL that doesn't help OAuth users.
Workaround
Related
Filed by Renamon 🦊