Update github check with aws log
parent
e4ad5aab34
commit
b4e33afb25
|
|
@ -6164,9 +6164,6 @@ 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,
|
||||
|
|
@ -6178,9 +6175,6 @@ class GitHub {
|
|||
// eslint-disable-next-line camelcase
|
||||
started_at: GitHub.startedDate,
|
||||
status,
|
||||
conclusion: result,
|
||||
// eslint-disable-next-line camelcase
|
||||
completed_at: GitHub.endedDate || GitHub.startedDate,
|
||||
output: {
|
||||
title: nameReadable,
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -65,10 +65,6 @@ 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,
|
||||
|
|
@ -80,9 +76,6 @@ class GitHub {
|
|||
// eslint-disable-next-line camelcase
|
||||
started_at: GitHub.startedDate,
|
||||
status,
|
||||
conclusion: result,
|
||||
// eslint-disable-next-line camelcase
|
||||
completed_at: GitHub.endedDate || GitHub.startedDate,
|
||||
output: {
|
||||
title: nameReadable,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue