mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
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:
6
lib/analyze-action.js
generated
6
lib/analyze-action.js
generated
@@ -95701,6 +95701,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
|
|||||||
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
||||||
const gitHubVersion = await getGitHubVersion();
|
const gitHubVersion = await getGitHubVersion();
|
||||||
let sarif;
|
let sarif;
|
||||||
|
category = uploadTarget.fixCategory(logger, category);
|
||||||
if (sarifPaths.length > 1) {
|
if (sarifPaths.length > 1) {
|
||||||
for (const sarifPath of sarifPaths) {
|
for (const sarifPath of sarifPaths) {
|
||||||
const parsedSarif = readSarifFile(sarifPath);
|
const parsedSarif = readSarifFile(sarifPath);
|
||||||
@@ -96152,10 +96153,7 @@ async function run() {
|
|||||||
const qualityUploadResult = await uploadFiles(
|
const qualityUploadResult = await uploadFiles(
|
||||||
outputDir,
|
outputDir,
|
||||||
getRequiredInput("checkout_path"),
|
getRequiredInput("checkout_path"),
|
||||||
analysis.fixCategory(
|
getOptionalInput("category"),
|
||||||
logger,
|
|
||||||
getOptionalInput("category")
|
|
||||||
),
|
|
||||||
features,
|
features,
|
||||||
logger,
|
logger,
|
||||||
analysis
|
analysis
|
||||||
|
|||||||
1
lib/init-action-post.js
generated
1
lib/init-action-post.js
generated
@@ -133162,6 +133162,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
|
|||||||
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
||||||
const gitHubVersion = await getGitHubVersion();
|
const gitHubVersion = await getGitHubVersion();
|
||||||
let sarif;
|
let sarif;
|
||||||
|
category = uploadTarget.fixCategory(logger, category);
|
||||||
if (sarifPaths.length > 1) {
|
if (sarifPaths.length > 1) {
|
||||||
for (const sarifPath of sarifPaths) {
|
for (const sarifPath of sarifPaths) {
|
||||||
const parsedSarif = readSarifFile(sarifPath);
|
const parsedSarif = readSarifFile(sarifPath);
|
||||||
|
|||||||
1
lib/upload-lib.js
generated
1
lib/upload-lib.js
generated
@@ -92593,6 +92593,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
|
|||||||
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
||||||
const gitHubVersion = await getGitHubVersion();
|
const gitHubVersion = await getGitHubVersion();
|
||||||
let sarif;
|
let sarif;
|
||||||
|
category = uploadTarget.fixCategory(logger, category);
|
||||||
if (sarifPaths.length > 1) {
|
if (sarifPaths.length > 1) {
|
||||||
for (const sarifPath of sarifPaths) {
|
for (const sarifPath of sarifPaths) {
|
||||||
const parsedSarif = readSarifFile(sarifPath);
|
const parsedSarif = readSarifFile(sarifPath);
|
||||||
|
|||||||
3
lib/upload-sarif-action.js
generated
3
lib/upload-sarif-action.js
generated
@@ -93229,6 +93229,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features
|
|||||||
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
logger.info(`Processing sarif files: ${JSON.stringify(sarifPaths)}`);
|
||||||
const gitHubVersion = await getGitHubVersion();
|
const gitHubVersion = await getGitHubVersion();
|
||||||
let sarif;
|
let sarif;
|
||||||
|
category = uploadTarget.fixCategory(logger, category);
|
||||||
if (sarifPaths.length > 1) {
|
if (sarifPaths.length > 1) {
|
||||||
for (const sarifPath of sarifPaths) {
|
for (const sarifPath of sarifPaths) {
|
||||||
const parsedSarif = readSarifFile(sarifPath);
|
const parsedSarif = readSarifFile(sarifPath);
|
||||||
@@ -93482,7 +93483,7 @@ async function uploadSarif(logger, features, checkoutPath, sarifPath, category)
|
|||||||
uploadResults[analysisKind] = await uploadSpecifiedFiles(
|
uploadResults[analysisKind] = await uploadSpecifiedFiles(
|
||||||
sarifFiles,
|
sarifFiles,
|
||||||
checkoutPath,
|
checkoutPath,
|
||||||
analysisConfig.fixCategory(logger, category),
|
category,
|
||||||
features,
|
features,
|
||||||
logger,
|
logger,
|
||||||
analysisConfig
|
analysisConfig
|
||||||
|
|||||||
@@ -349,10 +349,7 @@ async function run() {
|
|||||||
const qualityUploadResult = await uploadLib.uploadFiles(
|
const qualityUploadResult = await uploadLib.uploadFiles(
|
||||||
outputDir,
|
outputDir,
|
||||||
actionsUtil.getRequiredInput("checkout_path"),
|
actionsUtil.getRequiredInput("checkout_path"),
|
||||||
analysis.fixCategory(
|
actionsUtil.getOptionalInput("category"),
|
||||||
logger,
|
|
||||||
actionsUtil.getOptionalInput("category"),
|
|
||||||
),
|
|
||||||
features,
|
features,
|
||||||
logger,
|
logger,
|
||||||
analysis,
|
analysis,
|
||||||
|
|||||||
@@ -717,6 +717,7 @@ export async function uploadSpecifiedFiles(
|
|||||||
const gitHubVersion = await getGitHubVersion();
|
const gitHubVersion = await getGitHubVersion();
|
||||||
|
|
||||||
let sarif: SarifFile;
|
let sarif: SarifFile;
|
||||||
|
category = uploadTarget.fixCategory(logger, category);
|
||||||
|
|
||||||
if (sarifPaths.length > 1) {
|
if (sarifPaths.length > 1) {
|
||||||
// Validate that the files we were asked to upload are all valid SARIF files
|
// Validate that the files we were asked to upload are all valid SARIF files
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export async function uploadSarif(
|
|||||||
uploadResults[analysisKind] = await upload_lib.uploadSpecifiedFiles(
|
uploadResults[analysisKind] = await upload_lib.uploadSpecifiedFiles(
|
||||||
sarifFiles,
|
sarifFiles,
|
||||||
checkoutPath,
|
checkoutPath,
|
||||||
analysisConfig.fixCategory(logger, category),
|
category,
|
||||||
features,
|
features,
|
||||||
logger,
|
logger,
|
||||||
analysisConfig,
|
analysisConfig,
|
||||||
|
|||||||
Reference in New Issue
Block a user