tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IGitHubClientFactory.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3
4using Octokit;
5
7{
11 public interface IGitHubClientFactory
12 {
18 ValueTask<IGitHubClient> CreateClient(CancellationToken cancellationToken);
19
26 ValueTask<IGitHubClient> CreateClient(string accessToken, CancellationToken cancellationToken);
27
35 ValueTask<IGitHubClient?> CreateClientForRepository(string accessString, RepositoryIdentifier repositoryIdentifier, CancellationToken cancellationToken);
36
42 IGitHubClient? CreateAppClient(string tgsEncodedAppPrivateKey);
43 }
44}
Identifies a repository either by its RepositoryId or Owner and Name.
ValueTask< IGitHubClient?> CreateClientForRepository(string accessString, RepositoryIdentifier repositoryIdentifier, CancellationToken cancellationToken)
Creates a GitHub client that will only be used for a given repositoryIdentifier .
ValueTask< IGitHubClient > CreateClient(CancellationToken cancellationToken)
Create a IGitHubClient client. Low rate limit unless the server's GitHubAccessToken is set to bypass ...
IGitHubClient? CreateAppClient(string tgsEncodedAppPrivateKey)
Create an App (not installation) authenticated IGitHubClient.
ValueTask< IGitHubClient > CreateClient(string accessToken, CancellationToken cancellationToken)
Create a client with authentication using a personal access token.