spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
376 stars 33 forks source link

Use octocrab for GraphQL queries #187

Open jtietema opened 4 months ago

jtietema commented 4 months ago

Remove the manual use of reqwest::Client for graphql queries and use octocrab instead.

This removes the need to specify the github api base url multiple times. We instead leverage the global octocrab instance for which we configure the api base url once.

This is beneficial for a cleaner implementation of Github Enterprise support (#158), as we can configure the base url once.

For an example of what GHE support could look like on top of this, here is a draft PR https://github.com/jtietema/spr/pull/1