mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-07-19 13:54:44 -04:00
[GH-ISSUE #420] Replace custom GitHub client with official GraphQL one #50
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @13xforever on GitHub (Oct 5, 2019).
Original GitHub issue: https://github.com/RPCS3/discord-bot/issues/420
Originally assigned to: @grantwinney on GitHub.
Right now we're using a tiny custom-built client that is using older REST API version. It would be nice to migrate to a properly supported official client. This would also help in the future if we'll have to use authentication for increased request limits.
@grantwinney commented on GitHub (Oct 10, 2019):
I'd like to have a go at this. There's the official octokit.net library, which seems fairly established and I imagine is built on REST. Then there's the official octokit.graphql.net package, which should be great one day, but...
Would you like someone to look into migrating to one of these, or did you have something else in mind?
@grantwinney commented on GitHub (Oct 10, 2019):
If you decide to go with the octokit.net library, would you want to use the
PullRequestclass (for example) that they define, or translate it into your existingPrInfoclass?@grantwinney commented on GitHub (Oct 11, 2019):
I made a PR, which at least can be a discussion point. It could technically be merged, but there are issues that should probably be addressed first. Let me know what you think, and I'll understand if it's not the direction you want to go.
I'm in the process of trying to learn more about GraphQL in general, and GitHub's in particular since it seems they've got the most mature and well documented implementation around, but it's unfortunate their .NET client is still beta.
@13xforever commented on GitHub (Oct 11, 2019):
I'd prefer to migrate to official GraphQL client, even if it's in beta (half of the libraries we use are beta anyway).
There's no point in keeping our custom pocos, there shouldn't be too many places that would require to change the code (but that could be discussed if converting is easier).
I'll look at the pr in a few hours.
@grantwinney commented on GitHub (Oct 22, 2019):
I'm still here btw. I have some of the replacement done, but I'm not sure their GraphQL NuGet package can replace everything. Maybe I'll submit a draft PR in the next day or two so at least you'll have something to look at.
Replace custom GitHub client with official GraphQL oneto [GH-ISSUE #420] Replace custom GitHub client with official GraphQL one