Skip to content

Commit 056fb86

Browse files
committed
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.
1 parent 63d1b25 commit 056fb86

File tree

7 files changed

+9
-10
lines changed

7 files changed

+9
-10
lines changed

lib/analyze-action.js

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyze-action.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,7 @@ async function run() {
349349
const qualityUploadResult = await uploadLib.uploadFiles(
350350
outputDir,
351351
actionsUtil.getRequiredInput("checkout_path"),
352-
analysis.fixCategory(
353-
logger,
354-
actionsUtil.getOptionalInput("category"),
355-
),
352+
actionsUtil.getOptionalInput("category"),
356353
features,
357354
logger,
358355
analysis,

src/upload-lib.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,7 @@ export async function uploadSpecifiedFiles(
717717
const gitHubVersion = await getGitHubVersion();
718718

719719
let sarif: SarifFile;
720+
category = uploadTarget.fixCategory(logger, category);
720721

721722
if (sarifPaths.length > 1) {
722723
// Validate that the files we were asked to upload are all valid SARIF files

src/upload-sarif.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function uploadSarif(
3838
uploadResults[analysisKind] = await upload_lib.uploadSpecifiedFiles(
3939
sarifFiles,
4040
checkoutPath,
41-
analysisConfig.fixCategory(logger, category),
41+
category,
4242
features,
4343
logger,
4444
analysisConfig,

0 commit comments

Comments
 (0)