From 7fa45180db8d657b23ded3636b5d8583aec6ddfe Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Oct 2026 18:06:24 +0100 Subject: [PATCH] Use `shouldSkipSarifUpload` in `analyze-action.ts` --- lib/entry-points.js | 6 ++++-- src/analyze-action.ts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 230d5b40f..f70631437 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -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(), diff --git a/src/analyze-action.ts b/src/analyze-action.ts index a11877b38..0bed377be 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -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"