mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Merge branch 'dev' into CIAdjustments
This commit is contained in:
@@ -1628,7 +1628,7 @@ package (version) distribution(s); urgency=urgency
|
||||
return 0;
|
||||
}
|
||||
|
||||
static async ValueTask<int> CICompletionCheck(GitHubClient gitHubClient, string currentSha, string pemBase64)
|
||||
static async ValueTask GenerateAppCredentials(GitHubClient gitHubClient, string pemBase64)
|
||||
{
|
||||
var pemBytes = Convert.FromBase64String(pemBase64);
|
||||
var pem = Encoding.UTF8.GetString(pemBytes);
|
||||
@@ -1657,10 +1657,15 @@ package (version) distribution(s); urgency=urgency
|
||||
var installToken = await gitHubClient.GitHubApps.CreateInstallationToken(installation.Id);
|
||||
|
||||
gitHubClient.Credentials = new Credentials(installToken.Token);
|
||||
}
|
||||
|
||||
static async ValueTask<int> CICompletionCheck(GitHubClient gitHubClient, string currentSha, string pemBase64)
|
||||
{
|
||||
await GenerateAppCredentials(gitHubClient, pemBase64);
|
||||
|
||||
await gitHubClient.Check.Run.Create(RepoOwner, RepoName, new NewCheckRun("CI Completion", currentSha)
|
||||
{
|
||||
CompletedAt = now,
|
||||
CompletedAt = DateTime.UtcNow,
|
||||
Conclusion = CheckConclusion.Success,
|
||||
Output = new NewCheckRunOutput("CI Completion", "The CI Pipeline completed successfully"),
|
||||
Status = CheckStatus.Completed,
|
||||
|
||||
Reference in New Issue
Block a user