mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-07-19 13:54:44 -04:00
[PR #424] [CLOSED] Implement official client for GitHub v3 endpoints #496
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?
📋 Pull Request Information
Original PR: https://github.com/RPCS3/discord-bot/pull/424
Author: @grantwinney
Created: 10/11/2019
Status: ❌ Closed
Base:
master← Head:use_official_github_v3_client📝 Commits (1)
f9eb616use official client for github v3 endpoints📊 Changes
5 files changed (+102 additions, -77 deletions)
View changed files
📝
Clients/GithubClient/Client.cs(+23 -71)📝
Clients/GithubClient/GithubClient.csproj(+1 -0)📝
Clients/GithubClient/POCOs/PrInfo.cs(+73 -1)📝
CompatBot/Commands/Pr.cs(+3 -3)📝
CompatBot/Utils/ResultFormatters/UpdateInfoFormatter.cs(+2 -2)📄 Description
The open issue for #420 is to migrate to the GraphQL API, but the official .NET client is in beta. With that in mind, I figured I'd have a go at implementing their official client for the REST API.
If you don't want to go ahead with this, I'll understand! It'd be interesting to try out the GraphQL client too, even with their warnings. Not sure what parts are missing from it.
There's a few issues to address with this solution:
GetStatusesAsync(). I came across docs for Statuses but I'm not sure if the answer is in there.github.Miscellaneous.GetRateLimits()API call that's available, instead of parsing results out of the headers, which is cleaner but involves making an extra call (not sure if it actually counts toward the rate limits...)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.