Gate database export-diagnostics behind feature flag

This commit is contained in:
Angela P Wen
2023-03-15 15:35:14 -07:00
parent c193f610a2
commit 30ddec69e0
9 changed files with 95 additions and 49 deletions
Generated
+2 -4
View File
@@ -610,7 +610,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
];
await new toolrunner.ToolRunner(cmd, args).exec();
},
async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId, features) {
async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId) {
const args = [
"database",
"export-diagnostics",
@@ -618,11 +618,9 @@ async function getCodeQLForCmd(cmd, checkVersion) {
"--db-cluster",
"--format=sarif-latest",
`--output=${sarifFile}`,
"--sarif-include-diagnostics",
...getExtraOptionsFromEnv(["diagnostics", "export"]),
];
if (await features.getValue(feature_flags_1.Feature.ExportDiagnosticsEnabled, this)) {
args.push("--sarif-include-diagnostics");
}
if (automationDetailsId !== undefined) {
args.push("--sarif-category", automationDetailsId);
}