Improve logs for combined SARIF debug artifact

Don't start a "Uploading combined SARIF debug artifact" log group if we aren't going to do the upload.
This commit is contained in:
Henry Mercer 2025-02-12 16:27:40 +00:00
parent affec202b3
commit 3df6d20d31
6 changed files with 60 additions and 58 deletions

View file

@ -11,7 +11,7 @@ import { getCodeQL } from "./codeql";
import { getConfig } from "./config-utils";
import * as debugArtifacts from "./debug-artifacts";
import { EnvVar } from "./environment";
import { getActionsLogger, withGroup } from "./logging";
import { getActionsLogger } from "./logging";
import { checkGitHubVersionInRange, getErrorMessage } from "./util";
async function runWrapper() {
@ -31,12 +31,10 @@ async function runWrapper() {
if (config !== undefined) {
const codeql = await getCodeQL(config.codeQLCmd);
const version = await codeql.getVersion();
await withGroup("Uploading combined SARIF debug artifact", () =>
debugArtifacts.uploadCombinedSarifArtifacts(
logger,
config.gitHubVersion.type,
version.version,
),
await debugArtifacts.uploadCombinedSarifArtifacts(
logger,
config.gitHubVersion.type,
version.version,
);
}
}