Update github check with aws log

pull/479/head
Frostebite 2022-12-10 00:51:02 +00:00
parent 9b3fcee132
commit e4ad5aab34
3 changed files with 13 additions and 5 deletions

5
dist/index.js vendored
View File

@ -6164,6 +6164,9 @@ class GitHub {
const octokit = new core_1.Octokit({
auth: process.env.GITHUB_CHECK_TOKEN || token,
});
if (status === `completed` && GitHub.endedDate !== undefined) {
GitHub.endedDate = new Date().toISOString();
}
const data = {
owner,
repo,
@ -6177,7 +6180,7 @@ class GitHub {
status,
conclusion: result,
// eslint-disable-next-line camelcase
completed_at: '2018-05-04T01:14:52Z',
completed_at: GitHub.endedDate || GitHub.startedDate,
output: {
title: nameReadable,
summary,

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -5,8 +5,9 @@ import CloudRunnerOptions from './cloud-runner/cloud-runner-options';
class GitHub {
public static githubInputEnabled: boolean = true;
private static longDescriptionContent = ``;
private static startedDate;
private static longDescriptionContent: string = ``;
private static startedDate: string;
private static endedDate: string;
public static async createGitHubCheck(summary) {
if (!CloudRunnerOptions.githubChecksEnabled) {
@ -64,6 +65,10 @@ class GitHub {
auth: process.env.GITHUB_CHECK_TOKEN || token,
});
if (status === `completed` && GitHub.endedDate !== undefined) {
GitHub.endedDate = new Date().toISOString();
}
const data: any = {
owner,
repo,
@ -77,7 +82,7 @@ class GitHub {
status,
conclusion: result,
// eslint-disable-next-line camelcase
completed_at: '2018-05-04T01:14:52Z',
completed_at: GitHub.endedDate || GitHub.startedDate,
output: {
title: nameReadable,
summary,