mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 10:11:28 +00:00
Skip waiting for SARIF if nothing was uploaded
This commit is contained in:
6
lib/entry-points.js
generated
6
lib/entry-points.js
generated
@@ -180478,6 +180478,12 @@ async function waitForProcessing(repositoryNwo, sarifID, logger2, options = {
|
||||
}) {
|
||||
logger2.startGroup("Waiting for processing to finish");
|
||||
try {
|
||||
if (shouldSkipSarifUpload()) {
|
||||
logger2.info(
|
||||
"Nothing to wait for, because SARIF upload is disabled by an environment variable and the SARIF was saved to disk."
|
||||
);
|
||||
return;
|
||||
}
|
||||
const client = getApiClient();
|
||||
let statusCheckBackoff = STATUS_CHECK_INITIAL_BACKOFF_MILLISECONDS;
|
||||
if (process.env["NODE_ENV"] !== "test") {
|
||||
|
||||
@@ -866,6 +866,16 @@ export async function waitForProcessing(
|
||||
): Promise<void> {
|
||||
logger.startGroup("Waiting for processing to finish");
|
||||
try {
|
||||
// If SARIF uplaod is disabled and we reach this point, then the file was written to disk and
|
||||
// there is nothing to wait for. We still allow ourselves to get to this point so that we can
|
||||
// see in the log that we would have waited for processing to finish if the upload had happened.
|
||||
if (util.shouldSkipSarifUpload()) {
|
||||
logger.info(
|
||||
"Nothing to wait for, because SARIF upload is disabled by an environment variable and the SARIF was saved to disk.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const client = api.getApiClient();
|
||||
|
||||
// Do an initial wait because processing will always take a minimum of 2-3 seconds
|
||||
|
||||
Reference in New Issue
Block a user