mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2026-02-25 17:11:55 +00:00
Failover debugging.
It is indicating it is not getting Check Suite Information, which is unlikely.
This commit is contained in:
parent
db5738640c
commit
4449bb8588
4 changed files with 54 additions and 40 deletions
23
dist/post_run/index.js
vendored
23
dist/post_run/index.js
vendored
|
|
@ -6767,18 +6767,22 @@ function fetchCheckSuiteId(runId) {
|
|||
.catch((e) => {
|
||||
throw `Unable to fetch Workflow Run: ${e}`;
|
||||
});
|
||||
if (currentRun.status === `in_progress`) {
|
||||
// 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;
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`;
|
||||
}
|
||||
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);
|
||||
}
|
||||
// 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;
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
core.info(`::error::Error Fetching Current Run: ${e}`);
|
||||
core.info(`::error::Error Fetching Current Run (${runId}): ${e}`);
|
||||
}
|
||||
}
|
||||
return currentCheckSuiteId;
|
||||
|
|
@ -6890,7 +6894,6 @@ function resolveCheckRunId(checkRunIdent) {
|
|||
}
|
||||
catch (e) {
|
||||
core.info(`::error::Unable to resolve Check Run ID: ${e}`);
|
||||
core.info(`checkRunIdent = ` + util_1.inspect(checkRunIdent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
23
dist/pre/index.js
vendored
23
dist/pre/index.js
vendored
|
|
@ -6767,18 +6767,22 @@ function fetchCheckSuiteId(runId) {
|
|||
.catch((e) => {
|
||||
throw `Unable to fetch Workflow Run: ${e}`;
|
||||
});
|
||||
if (currentRun.status === `in_progress`) {
|
||||
// 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;
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`;
|
||||
}
|
||||
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);
|
||||
}
|
||||
// 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;
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
core.info(`::error::Error Fetching Current Run: ${e}`);
|
||||
core.info(`::error::Error Fetching Current Run (${runId}): ${e}`);
|
||||
}
|
||||
}
|
||||
return currentCheckSuiteId;
|
||||
|
|
@ -6890,7 +6894,6 @@ function resolveCheckRunId(checkRunIdent) {
|
|||
}
|
||||
catch (e) {
|
||||
core.info(`::error::Unable to resolve Check Run ID: ${e}`);
|
||||
core.info(`checkRunIdent = ` + util_1.inspect(checkRunIdent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
23
dist/run/index.js
vendored
23
dist/run/index.js
vendored
|
|
@ -6777,18 +6777,22 @@ function fetchCheckSuiteId(runId) {
|
|||
.catch((e) => {
|
||||
throw `Unable to fetch Workflow Run: ${e}`;
|
||||
});
|
||||
if (currentRun.status === `in_progress`) {
|
||||
// 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;
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`;
|
||||
}
|
||||
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);
|
||||
}
|
||||
// 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;
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
core.info(`::error::Error Fetching Current Run: ${e}`);
|
||||
core.info(`::error::Error Fetching Current Run (${runId}): ${e}`);
|
||||
}
|
||||
}
|
||||
return currentCheckSuiteId;
|
||||
|
|
@ -6900,7 +6904,6 @@ function resolveCheckRunId(checkRunIdent) {
|
|||
}
|
||||
catch (e) {
|
||||
core.info(`::error::Unable to resolve Check Run ID: ${e}`);
|
||||
core.info(`checkRunIdent = ` + util_1.inspect(checkRunIdent));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
25
src/run.ts
25
src/run.ts
|
|
@ -117,17 +117,23 @@ async function fetchCheckSuiteId(runId: number): Promise<number> {
|
|||
throw `Unable to fetch Workflow Run: ${e}`
|
||||
})
|
||||
|
||||
if (currentRun.status === `in_progress`) {
|
||||
// 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 = parseInt(currentRun.check_suite_url.substr(1 + currentRun.check_suite_url.lastIndexOf(`/`))) ?? -1
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`
|
||||
}
|
||||
if (!currentRun) {
|
||||
throw `Unexpected error: No run returned`
|
||||
}
|
||||
|
||||
if (currentRun.status !== `in_progress`) {
|
||||
throw `Unexpected error: Expected status of 'in_progress', got '${currentRun.status}': ` + 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 = parseInt(currentRun.check_suite_url.substr(1 + currentRun.check_suite_url.lastIndexOf(`/`))) ?? -1
|
||||
// The following SHOULD work, but alas
|
||||
// currentCheckSuiteId = currentRun.check_suite_id
|
||||
if (currentCheckSuiteId <= 0) {
|
||||
throw `Error extracting Check Suite ID from: ${currentRun.check_suite_url}`
|
||||
}
|
||||
} catch (e) {
|
||||
core.info(`::error::Error Fetching Current Run: ${e}`)
|
||||
core.info(`::error::Error Fetching Current Run (${runId}): ${e}`)
|
||||
}
|
||||
}
|
||||
return currentCheckSuiteId
|
||||
|
|
@ -260,7 +266,6 @@ async function resolveCheckRunId(checkRunIdent: CheckRunIdent): Promise<number>
|
|||
}
|
||||
} catch (e) {
|
||||
core.info(`::error::Unable to resolve Check Run ID: ${e}`)
|
||||
core.info(`checkRunIdent = ` + inspect(checkRunIdent))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue