Skip to content

Commit

Permalink
feat: Request token at repo scope (#237)
Browse files Browse the repository at this point in the history
Request `repo` instead of `public_repo` scope token to allow `ghstack`
to be used in private repositories.

Fixes #234
  • Loading branch information
amartani authored Mar 1, 2024
1 parent 46a85c4 commit 2160868
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ghstack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def read_config(
res = requests.post(
f"https://{github_url}/login/device/code",
headers={"Accept": "application/json"},
data={"client_id": CLIENT_ID, "scope": "public_repo"},
data={"client_id": CLIENT_ID, "scope": "repo"},
)
data = res.json()
print(f"User verification code: {data['user_code']}")
Expand Down

0 comments on commit 2160868

Please sign in to comment.