New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/gist-logs: On 404, the PAT probably needs more permissions #14523
cmd/gist-logs: On 404, the PAT probably needs more permissions #14523
Conversation
Review period will end on 2023-02-07 at 15:17:35 UTC. |
e6a2ce1
to
3b092eb
Compare
- This 404 error is from GitHub, and GitHub doesn't give us any more informations about scopes for the gist endpoint (for some reason). But we can safely assume, as it happens a lot, that "Error: Not Found" (404) is because the user hasn't granted their `HOMEBREW_GITHUB_API_TOKEN` the `gist` scope. Before: ```shell $ HOMEBREW_GITHUB_API_TOKEN=<token_without_gist_scope> brew gist-logs -p logrotate Error: Not Found ``` After: ```shell ❯ HOMEBREW_GITHUB_API_TOKEN=<token_without_gist_scope> brew gist-logs logrotate Error: Your GitHub API token likely doesn't have the `gist` scope. Create a GitHub personal access token: https://github.com/settings/tokens/new?scopes=gist&description=Homebrew echo 'export HOMEBREW_GITHUB_API_TOKEN=your_token_here' >> ~/.zshrc ```
3b092eb
to
41b143d
Compare
Review period skipped due to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are in nested modules/classes so need to be fully qualified.
Error: undefined local variable or method `pat_blurb' for #GitHub::API::RateLimitExceededError:0x00007fd0d6af2c98
Co-authored-by: Bo Anderson <mail@boanderson.me>
Thanks @Bo98, I hadn’t seen the CI failures yet. |
Does no one here sleep?? |
That'll be on my todo list somewhere. |
@Bo98 I thought we talked about this: add a |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?HOMEBREW_GITHUB_API_TOKEN
thegist
scope.Before:
After: