Update github check with aws log

pull/479/head
Frostebite 2022-12-10 01:00:07 +00:00
parent e4ad5aab34
commit b4e33afb25
3 changed files with 14 additions and 14 deletions

12
dist/index.js vendored
View File

@ -6164,9 +6164,6 @@ class GitHub {
const octokit = new core_1.Octokit({ const octokit = new core_1.Octokit({
auth: process.env.GITHUB_CHECK_TOKEN || token, auth: process.env.GITHUB_CHECK_TOKEN || token,
}); });
if (status === `completed` && GitHub.endedDate !== undefined) {
GitHub.endedDate = new Date().toISOString();
}
const data = { const data = {
owner, owner,
repo, repo,
@ -6178,9 +6175,6 @@ class GitHub {
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
started_at: GitHub.startedDate, started_at: GitHub.startedDate,
status, status,
conclusion: result,
// eslint-disable-next-line camelcase
completed_at: GitHub.endedDate || GitHub.startedDate,
output: { output: {
title: nameReadable, title: nameReadable,
summary, summary,
@ -6195,6 +6189,12 @@ class GitHub {
], ],
}, },
}; };
if (status === `completed` && GitHub.endedDate !== undefined) {
GitHub.endedDate = new Date().toISOString();
data.conclusion = result;
// eslint-disable-next-line camelcase
data.completed_at = GitHub.endedDate || GitHub.startedDate;
}
yield octokit.request(`PATCH /repos/${owner}/${repo}/check-runs/${checkRunId}`, data); yield octokit.request(`PATCH /repos/${owner}/${repo}/check-runs/${checkRunId}`, data);
}); });
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -65,10 +65,6 @@ class GitHub {
auth: process.env.GITHUB_CHECK_TOKEN || token, auth: process.env.GITHUB_CHECK_TOKEN || token,
}); });
if (status === `completed` && GitHub.endedDate !== undefined) {
GitHub.endedDate = new Date().toISOString();
}
const data: any = { const data: any = {
owner, owner,
repo, repo,
@ -80,9 +76,6 @@ class GitHub {
// eslint-disable-next-line camelcase // eslint-disable-next-line camelcase
started_at: GitHub.startedDate, started_at: GitHub.startedDate,
status, status,
conclusion: result,
// eslint-disable-next-line camelcase
completed_at: GitHub.endedDate || GitHub.startedDate,
output: { output: {
title: nameReadable, title: nameReadable,
summary, summary,
@ -98,6 +91,13 @@ class GitHub {
}, },
}; };
if (status === `completed` && GitHub.endedDate !== undefined) {
GitHub.endedDate = new Date().toISOString();
data.conclusion = result;
// eslint-disable-next-line camelcase
data.completed_at = GitHub.endedDate || GitHub.startedDate;
}
await octokit.request(`PATCH /repos/${owner}/${repo}/check-runs/${checkRunId}`, data); await octokit.request(`PATCH /repos/${owner}/${repo}/check-runs/${checkRunId}`, data);
} }
} }