Split SARIF uploading steps from uploadSpecifiedFiles into a function

This commit is contained in:
Michael B. Gale
2025-10-21 23:17:01 +01:00
parent 489ed914f1
commit 6fbdd5f4e9
5 changed files with 65 additions and 6 deletions

View File

@@ -133358,7 +133358,6 @@ async function uploadFiles(inputSarifPath, checkoutPath, category, features, log
);
}
async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features, logger, uploadTarget) {
logger.startGroup(`Uploading ${uploadTarget.name} results`);
const processingResults = await postProcessSarifFiles(
logger,
features,
@@ -133367,6 +133366,15 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
category,
uploadTarget
);
return uploadProcessedFiles(
logger,
checkoutPath,
uploadTarget,
processingResults
);
}
async function uploadProcessedFiles(logger, checkoutPath, uploadTarget, processingResults) {
logger.startGroup(`Uploading ${uploadTarget.name} results`);
const sarif = processingResults.sarif;
const toolNames = getToolNames(sarif);
logger.debug(`Validating that each SARIF run has a unique category`);