Merge branch 'dev' into CIAdjustments

This commit is contained in:
Jordan Dominion
2024-07-15 17:33:00 -04:00
2 changed files with 15 additions and 8 deletions
@@ -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,