mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 17:39:15 +00:00
Move UploadKind check into uploadSarif
This commit is contained in:
Generated
+14
-9
@@ -96180,7 +96180,7 @@ function filterAlertsByDiffRange(logger, sarif) {
|
||||
}
|
||||
|
||||
// src/upload-sarif.ts
|
||||
async function uploadSarif(logger, features, checkoutPath, sarifPath, category) {
|
||||
async function uploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category) {
|
||||
const sarifGroups = await getGroupedSarifFilePaths(
|
||||
logger,
|
||||
sarifPath
|
||||
@@ -96198,12 +96198,14 @@ async function uploadSarif(logger, features, checkoutPath, sarifPath, category)
|
||||
category,
|
||||
analysisConfig
|
||||
);
|
||||
uploadResults[analysisKind] = await uploadProcessedFiles(
|
||||
logger,
|
||||
checkoutPath,
|
||||
analysisConfig,
|
||||
processingResults
|
||||
);
|
||||
if (uploadKind === "always") {
|
||||
uploadResults[analysisKind] = await uploadProcessedFiles(
|
||||
logger,
|
||||
checkoutPath,
|
||||
analysisConfig,
|
||||
processingResults
|
||||
);
|
||||
}
|
||||
}
|
||||
return uploadResults;
|
||||
}
|
||||
@@ -96402,14 +96404,17 @@ async function run() {
|
||||
}
|
||||
core14.setOutput("db-locations", dbLocations);
|
||||
core14.setOutput("sarif-output", import_path4.default.resolve(outputDir));
|
||||
const uploadInput = getOptionalInput("upload");
|
||||
if (runStats && getUploadValue(uploadInput) === "always") {
|
||||
const uploadKind = getUploadValue(
|
||||
getOptionalInput("upload")
|
||||
);
|
||||
if (runStats) {
|
||||
const checkoutPath = getRequiredInput("checkout_path");
|
||||
const category = getOptionalInput("category");
|
||||
if (await features.getValue("analyze_use_new_upload" /* AnalyzeUseNewUpload */)) {
|
||||
uploadResults = await uploadSarif(
|
||||
logger,
|
||||
features,
|
||||
uploadKind,
|
||||
checkoutPath,
|
||||
outputDir,
|
||||
category
|
||||
|
||||
Generated
+10
-7
@@ -93620,7 +93620,7 @@ function filterAlertsByDiffRange(logger, sarif) {
|
||||
}
|
||||
|
||||
// src/upload-sarif.ts
|
||||
async function uploadSarif(logger, features, checkoutPath, sarifPath, category) {
|
||||
async function uploadSarif(logger, features, uploadKind, checkoutPath, sarifPath, category) {
|
||||
const sarifGroups = await getGroupedSarifFilePaths(
|
||||
logger,
|
||||
sarifPath
|
||||
@@ -93638,12 +93638,14 @@ async function uploadSarif(logger, features, checkoutPath, sarifPath, category)
|
||||
category,
|
||||
analysisConfig
|
||||
);
|
||||
uploadResults[analysisKind] = await uploadProcessedFiles(
|
||||
logger,
|
||||
checkoutPath,
|
||||
analysisConfig,
|
||||
processingResults
|
||||
);
|
||||
if (uploadKind === "always") {
|
||||
uploadResults[analysisKind] = await uploadProcessedFiles(
|
||||
logger,
|
||||
checkoutPath,
|
||||
analysisConfig,
|
||||
processingResults
|
||||
);
|
||||
}
|
||||
}
|
||||
return uploadResults;
|
||||
}
|
||||
@@ -93698,6 +93700,7 @@ async function run() {
|
||||
const uploadResults = await uploadSarif(
|
||||
logger,
|
||||
features,
|
||||
"always",
|
||||
checkoutPath,
|
||||
sarifPath,
|
||||
category
|
||||
|
||||
Reference in New Issue
Block a user