Move failed status report code into sendFailedStatusReport

This commit is contained in:
Michael B. Gale
2026-01-29 10:28:55 +00:00
parent fbe3ae9de8
commit 4dcc8a9cdc
3 changed files with 60 additions and 44 deletions

View File

@@ -21329,7 +21329,7 @@ var require_core = __commonJS({
exports2.getBooleanInput = getBooleanInput;
exports2.setOutput = setOutput2;
exports2.setCommandEcho = setCommandEcho;
exports2.setFailed = setFailed2;
exports2.setFailed = setFailed3;
exports2.isDebug = isDebug2;
exports2.debug = debug5;
exports2.error = error3;
@@ -21413,7 +21413,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
function setCommandEcho(enabled) {
(0, command_1.issue)("echo", enabled ? "on" : "off");
}
function setFailed2(message) {
function setFailed3(message) {
process.exitCode = ExitCode.Failure;
error3(message);
}
@@ -119590,6 +119590,24 @@ async function sendSuccessStatusReport(startedAt, config, registry_types, logger
await sendStatusReport(statusReport);
}
}
async function sendFailedStatusReport(logger, startedAt, language, unwrappedError) {
const error3 = wrapError(unwrappedError);
core10.setFailed(`start-proxy action failed: ${error3.message}`);
const errorStatusReportBase = await createStatusReportBase(
"start-proxy" /* StartProxy */,
getActionsStatus(error3),
startedAt,
{
languages: language && [language]
},
await checkDiskUsage(logger),
logger,
"Error from start-proxy Action omitted"
);
if (errorStatusReportBase !== void 0) {
await sendStatusReport(errorStatusReportBase);
}
}
var UPDATEJOB_PROXY = "update-job-proxy";
var UPDATEJOB_PROXY_VERSION = "v2.0.20250624110901";
var UPDATEJOB_PROXY_URL_PREFIX = "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.22.0/";
@@ -119831,22 +119849,7 @@ async function run(startedAt) {
logger
);
} catch (unwrappedError) {
const error3 = wrapError(unwrappedError);
core11.setFailed(`start-proxy action failed: ${error3.message}`);
const errorStatusReportBase = await createStatusReportBase(
"start-proxy" /* StartProxy */,
getActionsStatus(error3),
startedAt,
{
languages: language && [language]
},
await checkDiskUsage(logger),
logger,
"Error from start-proxy Action omitted"
);
if (errorStatusReportBase !== void 0) {
await sendStatusReport(errorStatusReportBase);
}
await sendFailedStatusReport(logger, startedAt, language, unwrappedError);
}
}
async function runWrapper() {