From 61eb6bdfe113485e818e484a2669ba1067fd4fd4 Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Wed, 29 Jul 2026 13:05:41 -0700 Subject: [PATCH] docs: Update token requirements to include read:org The new team reviewers functionality requires additional read:org permissions to get the available teams. It would be too confusing to make this optional, so require it and update the docs. --- README.md | 5 +++-- docs/revup.md | 4 ++-- revup/forge_utils.py | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dfc3b2c..b501fba 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,9 @@ Creating test PRs can be spammy so don't do the tutorial on other people's repos git clone https://github.com//revup.git && cd revup ``` -On first run, you will need to configure github credentials. Create a [GitHub Personal Access Token](https://github.com/settings/tokens/new?scopes=repo) -with "repo" scope. Revup needs this in order to create and modify pull requests. Then run +On first run, you will need to configure github credentials. Create a [GitHub Personal Access Token](https://github.com/settings/tokens/new?scopes=repo,read:org) +with the "repo" and "read:org" scopes, which revup needs in order to create and modify pull +requests. Then run ```sh revup config forge_oauth ``` diff --git a/docs/revup.md b/docs/revup.md index b9ee099..09e52f2 100644 --- a/docs/revup.md +++ b/docs/revup.md @@ -39,8 +39,8 @@ graphql requests to the forge. **--forge-oauth** : The oauth token that provides login credentials to the forge. Revup requires full repository read/write permissions in order to create -and modify reviews. For GitHub, this is represented by the "repo" section of -https://github.com/settings/tokens/new. +and modify reviews. For GitHub, this requires the "repo" and "read:org" scopes at +https://github.com/settings/tokens/new?scopes=repo,read:org. **--forge-url** : URL to use for the forge. Defaults to "github.com" and would only diff --git a/revup/forge_utils.py b/revup/forge_utils.py index 6792347..f6fd913 100644 --- a/revup/forge_utils.py +++ b/revup/forge_utils.py @@ -110,7 +110,7 @@ async def forge_connection( "Set the GITHUB_TOKEN environment variable, " "login with 'gh auth login', " "or make one at https://github.com/settings/tokens/new " - "(revup needs full repo permissions) " + "(revup needs the 'repo' and 'read:org' scopes) " "then set it with `revup config forge_oauth`." )