tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IGitHubService.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Threading;
4using System.Threading.Tasks;
5
6using Octokit;
7
9
11{
15 public interface IGitHubService
16 {
22 ValueTask<Uri> GetUpdatesRepositoryUrl(CancellationToken cancellationToken);
23
30 ValueTask<Dictionary<Version, Release>> GetTgsReleases(CancellationToken cancellationToken);
31
39 ValueTask<string> CreateOAuthAccessToken(OAuthConfiguration oAuthConfiguration, string code, CancellationToken cancellationToken);
40
48 ValueTask<long> GetRepositoryId(string repoOwner, string repoName, CancellationToken cancellationToken);
49
55 ValueTask<long> GetCurrentUserId(CancellationToken cancellationToken);
56
65 Task<PullRequest> GetPullRequest(string repoOwner, string repoName, int pullRequestNumber, CancellationToken cancellationToken);
66
75 Task<GitHubCommit> GetCommit(string repoOwner, string repoName, string committish, CancellationToken cancellationToken);
76 }
77}
Service for interacting with the GitHub API.
ValueTask< string > CreateOAuthAccessToken(OAuthConfiguration oAuthConfiguration, string code, CancellationToken cancellationToken)
Attempt to get an OAuth token from a given code .
ValueTask< long > GetCurrentUserId(CancellationToken cancellationToken)
Get the current user's ID.
ValueTask< Dictionary< Version, Release > > GetTgsReleases(CancellationToken cancellationToken)
Get all valid TGS Releases from the configured update source.
ValueTask< long > GetRepositoryId(string repoOwner, string repoName, CancellationToken cancellationToken)
Get a target repostiory's ID.
ValueTask< Uri > GetUpdatesRepositoryUrl(CancellationToken cancellationToken)
Gets the Uri of the repository designated as the updates repository.
Task< GitHubCommit > GetCommit(string repoOwner, string repoName, string committish, CancellationToken cancellationToken)
Get a given committish .
Task< PullRequest > GetPullRequest(string repoOwner, string repoName, int pullRequestNumber, CancellationToken cancellationToken)
Get a given pullRequestNumber .