mirror of
https://github.com/github/codeql-action.git
synced 2025-12-06 07:48:17 +08:00
Compare commits
3 Commits
267c4672a5
...
tjgurwara9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0ac6a3918 | ||
|
|
e88bb838a4 | ||
|
|
462b0d45ad |
@@ -18,6 +18,11 @@ inputs:
|
||||
required: false
|
||||
# If changing this, make sure to update workflow.ts accordingly.
|
||||
default: "always"
|
||||
upload-quality-only:
|
||||
description: >-
|
||||
This is not recommended for external users since it complicates debugging. Upload the SARIF file to Code Quality only.
|
||||
Defaults to 'false' which uploads the generated SARIFs to both Code Scanning and Code Quality.
|
||||
'true' only uploads the SARIF file to Code Quality.
|
||||
cleanup-level:
|
||||
description: "Level of cleanup to perform on CodeQL databases at the end of the analyze step. This should either be 'none' to skip cleanup, or be a valid argument for the --cache-cleanup flag of the CodeQL CLI command 'codeql database cleanup' as documented at https://codeql.github.com/docs/codeql-cli/manual/database-cleanup"
|
||||
required: false
|
||||
|
||||
7
lib/analyze-action.js
generated
7
lib/analyze-action.js
generated
@@ -223,9 +223,12 @@ async function run() {
|
||||
core.setOutput("db-locations", dbLocations);
|
||||
core.setOutput("sarif-output", path_1.default.resolve(outputDir));
|
||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||
const uploadQualityOnly = actionsUtil.getOptionalInput("upload-quality-only");
|
||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||
uploadResult = await uploadLib.uploadFiles(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), features, logger, uploadLib.CodeScanningTarget);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
if (uploadQualityOnly !== "true") {
|
||||
uploadResult = await uploadLib.uploadFiles(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), features, logger, uploadLib.CodeScanningTarget);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
}
|
||||
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||
const qualityUploadResult = await uploadLib.uploadFiles(outputDir, actionsUtil.getRequiredInput("checkout_path"), actionsUtil.getOptionalInput("category"), features, logger, uploadLib.CodeQualityTarget);
|
||||
core.setOutput("quality-sarif-id", qualityUploadResult.sarifID);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -331,16 +331,21 @@ async function run() {
|
||||
core.setOutput("db-locations", dbLocations);
|
||||
core.setOutput("sarif-output", path.resolve(outputDir));
|
||||
const uploadInput = actionsUtil.getOptionalInput("upload");
|
||||
const uploadQualityOnly = actionsUtil.getOptionalInput(
|
||||
"upload-quality-only",
|
||||
);
|
||||
if (runStats && actionsUtil.getUploadValue(uploadInput) === "always") {
|
||||
uploadResult = await uploadLib.uploadFiles(
|
||||
outputDir,
|
||||
actionsUtil.getRequiredInput("checkout_path"),
|
||||
actionsUtil.getOptionalInput("category"),
|
||||
features,
|
||||
logger,
|
||||
uploadLib.CodeScanningTarget,
|
||||
);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
if (uploadQualityOnly !== "true") {
|
||||
uploadResult = await uploadLib.uploadFiles(
|
||||
outputDir,
|
||||
actionsUtil.getRequiredInput("checkout_path"),
|
||||
actionsUtil.getOptionalInput("category"),
|
||||
features,
|
||||
logger,
|
||||
uploadLib.CodeScanningTarget,
|
||||
);
|
||||
core.setOutput("sarif-id", uploadResult.sarifID);
|
||||
}
|
||||
|
||||
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||
const qualityUploadResult = await uploadLib.uploadFiles(
|
||||
|
||||
@@ -656,14 +656,6 @@ export async function runQueries(
|
||||
|
||||
const queries: string[] = [];
|
||||
if (config.augmentationProperties.qualityQueriesInput !== undefined) {
|
||||
queries.push(
|
||||
path.join(
|
||||
util.getCodeQLDatabasePath(config, language),
|
||||
"temp",
|
||||
"config-queries.qls",
|
||||
),
|
||||
);
|
||||
|
||||
for (const qualityQuery of config.augmentationProperties
|
||||
.qualityQueriesInput) {
|
||||
queries.push(resolveQuerySuiteAlias(language, qualityQuery.uses));
|
||||
|
||||
Reference in New Issue
Block a user