Generate A GitHub PAT
Use a GitHub personal access token only when Commentary's normal GitHub App sign-in is not available. For most users, Continue with GitHub is simpler and gives Commentary installation-aware access.
Prefer a fine-grained PAT instead of a classic token.
Create The Token
- Sign in to GitHub.
- Open
Settings. - Open
Developer settings. - Open
Personal access tokens, thenFine-grained tokens. - Click
Generate new token. - Give the token a clear name and choose an expiration date.
- Set the resource owner that owns the repository you want to review.
- Limit repository access to only the repository or repositories you need.
- Grant the minimum repository permissions for your task.
- Generate the token.
- Copy it immediately. GitHub will not show the full token again.
- In Commentary, click
Sign in. - Open
Use personal access token. - Paste the token and submit.
Repository Permissions
Use GitHub's fine-grained repository permissions:
- To view a repository in Commentary, grant
ContentswithRead-onlyaccess. - To view a pull request, grant
ContentswithRead-onlyaccess andPull requestswithRead-onlyaccess. - To comment on a pull request from Commentary, keep
ContentsasRead-onlyand grantPull requestswithRead and writeaccess.
Keep It Narrow
- Use fine-grained tokens.
- Limit the token to the smallest repository set that works.
- Set an expiration date.
- Revoke tokens you no longer need.
If Commentary says the token is accepted but the repository still fails, the token usually lacks a repository or permission GitHub requires for the attempted action.
GitHub Docs
- Managing personal access tokens: GitHub Docs
- Fine-grained PAT permissions reference: GitHub Docs