mirror of
https://github.com/github/codeql-action.git
synced 2026-05-07 22:30:44 +00:00
Pass "--sarif-include-diagnostics" when feature flag on
This commit is contained in:
Generated
+9
-5
@@ -606,24 +606,25 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
];
|
||||
await new toolrunner.ToolRunner(cmd, args).exec();
|
||||
},
|
||||
async databaseExportDiagnostics(databasePath, isCluster, sarifFile, automationDetailsId) {
|
||||
async databaseExportDiagnostics(databasePath, sarifFile, exportDiagnosticsEnabled, automationDetailsId) {
|
||||
const args = [
|
||||
"database",
|
||||
"export-diagnostics",
|
||||
"--db-cluster",
|
||||
"--format=sarif-latest",
|
||||
`--output=${sarifFile}`,
|
||||
...getExtraOptionsFromEnv(["diagnostics", "export"]),
|
||||
];
|
||||
if (isCluster) {
|
||||
args.push("--db-cluster");
|
||||
}
|
||||
args.push(databasePath);
|
||||
if (exportDiagnosticsEnabled === true) {
|
||||
args.push("--sarif-include-diagnostics");
|
||||
}
|
||||
if (automationDetailsId !== undefined) {
|
||||
args.push("--sarif-category", automationDetailsId);
|
||||
}
|
||||
await new toolrunner.ToolRunner(cmd, args).exec();
|
||||
},
|
||||
async diagnosticsExport(sarifFile, automationDetailsId) {
|
||||
async diagnosticsExport(sarifFile, exportDiagnosticsEnabled, automationDetailsId) {
|
||||
const args = [
|
||||
"diagnostics",
|
||||
"export",
|
||||
@@ -631,6 +632,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
`--output=${sarifFile}`,
|
||||
...getExtraOptionsFromEnv(["diagnostics", "export"]),
|
||||
];
|
||||
if (exportDiagnosticsEnabled === true) {
|
||||
args.push("--sarif-include-diagnostics");
|
||||
}
|
||||
if (automationDetailsId !== undefined) {
|
||||
args.push("--sarif-category", automationDetailsId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user