Skip to content

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

@ComputerDruid

Description

@ComputerDruid

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions