Skip to content
Prev Previous commit
Next Next commit
Tweak SARIF skipping logs
  • Loading branch information
redsun82 committed Oct 6, 2025
commit 00a6e13cbfc3c235afc298030cf9b1728b498130
4 changes: 3 additions & 1 deletion lib/analyze-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/init-action-post.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions lib/upload-sarif-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/upload-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,9 @@ async function uploadPayload(
actionsUtil.getTemporaryDirectory(),
"payload.json",
);
logger.info(`SARIF upload disabled. Saving to ${payloadSaveFile}`);
logger.info(
`SARIF upload disabled via environment variable. Saving to ${payloadSaveFile}`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor:

Suggested change
`SARIF upload disabled via environment variable. Saving to ${payloadSaveFile}`,
`SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}`,

);
logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`);
fs.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2));
return "dummy-sarif-id";
Expand Down
4 changes: 3 additions & 1 deletion src/upload-sarif-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ async function run() {

// We don't upload results in test mode, so don't wait for processing
if (shouldSkipSarifUpload()) {
core.debug("SARIF upload disabled. Waiting for processing is disabled.");
core.debug(
"SARIF upload disabled via environment variable. Waiting for processing is disabled.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"SARIF upload disabled via environment variable. Waiting for processing is disabled.",
"SARIF upload disabled by an environment variable. Waiting for processing is disabled.",

);
} else if (actionsUtil.getRequiredInput("wait-for-processing") === "true") {
if (codeScanningResult !== undefined) {
await upload_lib.waitForProcessing(
Expand Down
Loading