Several repository write tools declared the broad `repo` scope, which hid
them from tokens limited to `public_repo` and forced public-only OAuth
deployments to request private-repository access.
Lower the required scope to public_repo for tools that only operate on
repositories the token can already reach:
- add_issue_comment
- issue_write
- create_branch
- push_files
- create_pull_request
- fork_repository
Because RequiredScopes are expanded through the scope hierarchy, a full
repo token remains accepted for every tool. GitHub continues to enforce
actual per-repository permissions at the API layer.
Fixes github#3136
Summary
Fixes #3136 by lowering the required OAuth scope from repo to public_repo for the six repository write tools the issue identifies as public-repo-safe:
An OAuth deployment that only needs to contribute to public repositories can now request least-privilege public_repo instead of the broad repo scope (which also grants private-repository access).
Why this is safe
Testing