Call fixCategory in uploadSpecifiedFiles

Since `fixCategory` is now part of `AnalysisConfig`, we don't have to remember to do it at the call site for `uploadSpecifiedFiles` or `uploadFiles` anymore.
This commit is contained in:
Michael B. Gale
2025-09-29 12:57:45 +01:00
parent 63d1b25e97
commit 056fb86575
7 changed files with 9 additions and 10 deletions

6
lib/analyze-action.js generated
View File

@@ -95701,6 +95701,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
let sarif;
category = uploadTarget.fixCategory(logger, category);
if (sarifPaths.length > 1) {
for (const sarifPath of sarifPaths) {
const parsedSarif = readSarifFile(sarifPath);
@@ -96152,10 +96153,7 @@ async function run() {
const qualityUploadResult = await uploadFiles(
outputDir,
getRequiredInput("checkout_path"),
analysis.fixCategory(
logger,
getOptionalInput("category")
),
getOptionalInput("category"),
features,
logger,
analysis

View File

@@ -133162,6 +133162,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
let sarif;
category = uploadTarget.fixCategory(logger, category);
if (sarifPaths.length > 1) {
for (const sarifPath of sarifPaths) {
const parsedSarif = readSarifFile(sarifPath);

1
lib/upload-lib.js generated
View File

@@ -92593,6 +92593,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
let sarif;
category = uploadTarget.fixCategory(logger, category);
if (sarifPaths.length > 1) {
for (const sarifPath of sarifPaths) {
const parsedSarif = readSarifFile(sarifPath);

View File

@@ -93229,6 +93229,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
const gitHubVersion = await getGitHubVersion();
let sarif;
category = uploadTarget.fixCategory(logger, category);
if (sarifPaths.length > 1) {
for (const sarifPath of sarifPaths) {
const parsedSarif = readSarifFile(sarifPath);
@@ -93482,7 +93483,7 @@ async function uploadSarif(logger, features, checkoutPath, sarifPath, category)
uploadResults[analysisKind] = await uploadSpecifiedFiles(
sarifFiles,
checkoutPath,
analysisConfig.fixCategory(logger, category),
category,
features,
logger,
analysisConfig

View File

@@ -349,10 +349,7 @@ async function run() {
const qualityUploadResult = await uploadLib.uploadFiles(
outputDir,
actionsUtil.getRequiredInput("checkout_path"),
analysis.fixCategory(
logger,
actionsUtil.getOptionalInput("category"),
),
actionsUtil.getOptionalInput("category"),
features,
logger,
analysis,

View File

@@ -717,6 +717,7 @@ export async function uploadSpecifiedFiles(
const gitHubVersion = await getGitHubVersion();
let sarif: SarifFile;
category = uploadTarget.fixCategory(logger, category);
if (sarifPaths.length > 1) {
// Validate that the files we were asked to upload are all valid SARIF files

View File

@@ -38,7 +38,7 @@ export async function uploadSarif(
uploadResults[analysisKind] = await upload_lib.uploadSpecifiedFiles(
sarifFiles,
checkoutPath,
analysisConfig.fixCategory(logger, category),
category,
features,
logger,
analysisConfig,