Use shouldSkipSarifUpload in analyze-action.ts

This commit is contained in:
Michael B. Gale
2026-10-20 18:06:24 +01:00
parent a69c7cb332
commit 7fa45180db
2 changed files with 8 additions and 4 deletions

6
lib/entry-points.js generated
View File

@@ -180930,8 +180930,10 @@ async function run(action) {
logger2
);
}
if (isInTestMode()) {
logger2.debug("In test mode. Waiting for processing is disabled.");
if (shouldSkipSarifUpload()) {
logger2.debug(
"SARIF upload is disabled and nothing was uploaded, so we do not need to wait for processing to finish."
);
} else if (uploadResults?.["code-scanning" /* CodeScanning */] !== void 0 && getRequiredInput("wait-for-processing") === "true") {
await waitForProcessing(
getRepositoryNwo(),

View File

@@ -434,8 +434,10 @@ async function run(action: ActionState<["Base", "Logger", "Env", "Actions"]>) {
}
// We don't upload results in test mode, so don't wait for processing
if (util.isInTestMode()) {
logger.debug("In test mode. Waiting for processing is disabled.");
if (util.shouldSkipSarifUpload()) {
logger.debug(
"SARIF upload is disabled and nothing was uploaded, so we do not need to wait for processing to finish.",
);
} else if (
uploadResults?.[analyses.AnalysisKind.CodeScanning] !== undefined &&
actionsUtil.getRequiredInput("wait-for-processing") === "true"