From 93299c2fa22fd463db31668eba54b34b58270696 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 5 Oct 2023 16:11:03 +0900 Subject: [PATCH] Allow more neutral run When 1 workflow have 2 jobs and they are sequential Following step is just skipped, currently failed I may allow all of neutral run in future https://github.com/pankona/pankona.github.com/actions/runs/6410420717/job/17403687217?pr=186 https://github.com/pankona/pankona.github.com/blob/bd07d1e9d76ec444f1a847a3ebf5376ec2e5daa9/.github/workflows/generate_site_and_deploy.yaml#L73-L74 --- dist/index.js | 2 +- src/github-api.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index b33bc8d5..a1828c1f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12849,7 +12849,7 @@ async function getCheckRunSummaries(token, params) { throw new Error("no runNodes"); } return runNodes.map((run2) => ({ - acceptable: run2.conclusion == "SUCCESS" || run2.conclusion === "SKIPPED" || checkSuite.conclusion === "SKIPPED", + acceptable: run2.conclusion == "SUCCESS" || run2.conclusion === "SKIPPED" || run2.conclusion === "NEUTRAL" && (checkSuite.conclusion === "SUCCESS" || checkSuite.conclusion === "SKIPPED"), workflowPath: relative(`/${params.owner}/${params.repo}/actions/workflows/`, workflow.resourcePath), checkSuiteStatus: checkSuite.status, checkSuiteConclusion: checkSuite.conclusion, diff --git a/src/github-api.ts b/src/github-api.ts index 6cb7c267..d5b478db 100644 --- a/src/github-api.ts +++ b/src/github-api.ts @@ -115,7 +115,9 @@ export async function getCheckRunSummaries( } return runNodes.map((run) => ({ - acceptable: run.conclusion == 'SUCCESS' || run.conclusion === 'SKIPPED' || checkSuite.conclusion === 'SKIPPED', + acceptable: run.conclusion == 'SUCCESS' || run.conclusion === 'SKIPPED' + || (run.conclusion === 'NEUTRAL' + && (checkSuite.conclusion === 'SUCCESS' || checkSuite.conclusion === 'SKIPPED')), workflowPath: relative(`/${params.owner}/${params.repo}/actions/workflows/`, workflow.resourcePath), checkSuiteStatus: checkSuite.status,