diff --git a/dist/post_run/index.js b/dist/post_run/index.js index 173bc7f..f475e3c 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -6770,8 +6770,8 @@ function fetchCheckSuiteId(runId) { if (!currentRun) { throw `Unexpected error: No run returned`; } - if (currentRun.status !== `in_progress`) { - throw `Unexpected error: Expected status of 'in_progress', got '${currentRun.status}': ` + util_1.inspect(currentRun); + if (currentRun.conclusion) { + throw `Unexpected error: Expected Check Suite with no conclusion, got: ` + util_1.inspect(currentRun); } // The GitHub API it's self does present the `check_suite_id` property, but it is not documented or present returned object's `type` currentCheckSuiteId = (_a = parseInt(currentRun.check_suite_url.substr(1 + currentRun.check_suite_url.lastIndexOf(`/`)))) !== null && _a !== void 0 ? _a : -1; diff --git a/dist/pre/index.js b/dist/pre/index.js index 8c67cff..01fd1df 100644 --- a/dist/pre/index.js +++ b/dist/pre/index.js @@ -6770,8 +6770,8 @@ function fetchCheckSuiteId(runId) { if (!currentRun) { throw `Unexpected error: No run returned`; } - if (currentRun.status !== `in_progress`) { - throw `Unexpected error: Expected status of 'in_progress', got '${currentRun.status}': ` + util_1.inspect(currentRun); + if (currentRun.conclusion) { + throw `Unexpected error: Expected Check Suite with no conclusion, got: ` + util_1.inspect(currentRun); } // The GitHub API it's self does present the `check_suite_id` property, but it is not documented or present returned object's `type` currentCheckSuiteId = (_a = parseInt(currentRun.check_suite_url.substr(1 + currentRun.check_suite_url.lastIndexOf(`/`)))) !== null && _a !== void 0 ? _a : -1; diff --git a/dist/run/index.js b/dist/run/index.js index fab5406..a6138a7 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -6780,8 +6780,8 @@ function fetchCheckSuiteId(runId) { if (!currentRun) { throw `Unexpected error: No run returned`; } - if (currentRun.status !== `in_progress`) { - throw `Unexpected error: Expected status of 'in_progress', got '${currentRun.status}': ` + util_1.inspect(currentRun); + if (currentRun.conclusion) { + throw `Unexpected error: Expected Check Suite with no conclusion, got: ` + util_1.inspect(currentRun); } // The GitHub API it's self does present the `check_suite_id` property, but it is not documented or present returned object's `type` currentCheckSuiteId = (_a = parseInt(currentRun.check_suite_url.substr(1 + currentRun.check_suite_url.lastIndexOf(`/`)))) !== null && _a !== void 0 ? _a : -1; diff --git a/src/run.ts b/src/run.ts index e65612f..dc66d76 100644 --- a/src/run.ts +++ b/src/run.ts @@ -121,8 +121,8 @@ async function fetchCheckSuiteId(runId: number): Promise { throw `Unexpected error: No run returned` } - if (currentRun.status !== `in_progress`) { - throw `Unexpected error: Expected status of 'in_progress', got '${currentRun.status}': ` + inspect(currentRun) + if (currentRun.conclusion) { + throw `Unexpected error: Expected Check Suite with no conclusion, got: ` + inspect(currentRun) } // The GitHub API it's self does present the `check_suite_id` property, but it is not documented or present returned object's `type`