Include action/post-action suffix in getDisplayActionName

This commit is contained in:
Michael B. Gale
2026-10-21 16:45:27 +01:00
parent 64ec5d5f67
commit 00434f00f4
4 changed files with 31 additions and 27 deletions

13
lib/entry-points.js generated
View File

@@ -171438,17 +171438,18 @@ function getAddressString(address) {
// src/status-report.ts
var ACTION_DISPLAY_NAMES = {
["finish" /* Analyze */]: "analyze",
["analyze-post" /* AnalyzePost */]: "analyze post-action",
["init-post" /* InitPost */]: "init post",
["start-proxy-post" /* StartProxyPost */]: "start-proxy post-action",
["upload-sarif-post" /* UploadSarifPost */]: "upload-sarif post-action"
["analyze-post" /* AnalyzePost */]: "analyze",
["init-post" /* InitPost */]: "init",
["start-proxy-post" /* StartProxyPost */]: "start-proxy",
["upload-sarif-post" /* UploadSarifPost */]: "upload-sarif"
};
function isPostAction(name) {
return name.endsWith("-post");
}
function getDisplayActionName(actionName) {
const suffix = isPostAction(actionName) ? "post-action" : "action";
const displayName = ACTION_DISPLAY_NAMES[actionName];
return displayName ?? actionName;
return `${displayName ?? actionName} ${suffix}`;
}
function getJobUUID(action) {
const existingJobRunUuid = action.env.getOptional("CODEQL_ACTION_JOB_RUN_UUID" /* JOB_RUN_UUID */);
@@ -171794,7 +171795,7 @@ async function runInActions(action) {
await action.run(actionState);
} catch (error3) {
core9.setFailed(
`${getDisplayActionName(action.name)} action failed: ${getErrorMessage(error3)}`
`${getDisplayActionName(action.name)} failed: ${getErrorMessage(error3)}`
);
const statusReportError = action.transformTelemetryError !== void 0 ? action.transformTelemetryError(wrapError(error3)) : error3;
await sendUnhandledErrorStatusReport(