Update github check with aws log
parent
9b3fcee132
commit
e4ad5aab34
|
|
@ -6164,6 +6164,9 @@ 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,
|
||||||
|
|
@ -6177,7 +6180,7 @@ class GitHub {
|
||||||
status,
|
status,
|
||||||
conclusion: result,
|
conclusion: result,
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
completed_at: '2018-05-04T01:14:52Z',
|
completed_at: GitHub.endedDate || GitHub.startedDate,
|
||||||
output: {
|
output: {
|
||||||
title: nameReadable,
|
title: nameReadable,
|
||||||
summary,
|
summary,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -5,8 +5,9 @@ import CloudRunnerOptions from './cloud-runner/cloud-runner-options';
|
||||||
|
|
||||||
class GitHub {
|
class GitHub {
|
||||||
public static githubInputEnabled: boolean = true;
|
public static githubInputEnabled: boolean = true;
|
||||||
private static longDescriptionContent = ``;
|
private static longDescriptionContent: string = ``;
|
||||||
private static startedDate;
|
private static startedDate: string;
|
||||||
|
private static endedDate: string;
|
||||||
|
|
||||||
public static async createGitHubCheck(summary) {
|
public static async createGitHubCheck(summary) {
|
||||||
if (!CloudRunnerOptions.githubChecksEnabled) {
|
if (!CloudRunnerOptions.githubChecksEnabled) {
|
||||||
|
|
@ -64,6 +65,10 @@ 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,
|
||||||
|
|
@ -77,7 +82,7 @@ class GitHub {
|
||||||
status,
|
status,
|
||||||
conclusion: result,
|
conclusion: result,
|
||||||
// eslint-disable-next-line camelcase
|
// eslint-disable-next-line camelcase
|
||||||
completed_at: '2018-05-04T01:14:52Z',
|
completed_at: GitHub.endedDate || GitHub.startedDate,
|
||||||
output: {
|
output: {
|
||||||
title: nameReadable,
|
title: nameReadable,
|
||||||
summary,
|
summary,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue