Skip to content
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

relnotes doesn't ~~work~~ give a good error message with fine-grained API Token #123

Closed
ComputerDruid opened this issue Feb 24, 2023 · 0 comments · Fixed by #124
Closed

Comments

@ComputerDruid
Copy link
Contributor

GitHub has launched Fine-grained personal access tokens, but they apparently don't work with the GraphQL API yet

That's not really a problem, since you can still generate and use a classic token. But the error message is a little hard to diagnose:

$ cargo run --release 1.68.0 | tee notes.md
    Finished release [optimized] target(s) in 0.09s
     Running `target/release/relnotes 1.68.0`
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/main.rs:177:52
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The json it's giving back turns out to be:

{"documentation_url":"https://docs.github.com/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql","message":"Personal access tokens with fine grained access do not support the GraphQL API"}

Which is easy enough to understand, we should probably just surface that somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant