Skip to content

Commit 6e69a92

Browse files
committed
Remove Feature.OverlayAnalysis minimumVersion
getOverlayDatabaseMode() already performs the same version check, so we can remove minimumVersion from Feature.OverlayAnalysis. Doing so allows the action to perform feature checks without CodeQL CLI.
1 parent 6a87ebe commit 6e69a92

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/config-utils.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -600,21 +600,18 @@ async function isOverlayAnalysisFeatureEnabled(
600600
if (!["github", "dsp-testing"].includes(repository.owner)) {
601601
return false;
602602
}
603-
if (!(await features.getValue(Feature.OverlayAnalysis, codeql))) {
603+
if (!(await features.getValue(Feature.OverlayAnalysis))) {
604604
return false;
605605
}
606606
let enableForCodeScanningOnly = false;
607607
for (const language of languages) {
608608
const feature = OVERLAY_ANALYSIS_FEATURES[language];
609-
if (feature && (await features.getValue(feature, codeql))) {
609+
if (feature && (await features.getValue(feature))) {
610610
continue;
611611
}
612612
const codeScanningFeature =
613613
OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES[language];
614-
if (
615-
codeScanningFeature &&
616-
(await features.getValue(codeScanningFeature, codeql))
617-
) {
614+
if (codeScanningFeature && (await features.getValue(codeScanningFeature))) {
618615
enableForCodeScanningOnly = true;
619616
continue;
620617
}

src/feature-flags.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { getApiClient } from "./api-client";
77
import type { CodeQL } from "./codeql";
88
import * as defaults from "./defaults.json";
99
import { Logger } from "./logging";
10-
import { CODEQL_OVERLAY_MINIMUM_VERSION } from "./overlay-database-utils";
1110
import { RepositoryNwo } from "./repository";
1211
import { ToolsFeature } from "./tools-features";
1312
import * as util from "./util";
@@ -157,7 +156,7 @@ export const featureConfig: Record<
157156
[Feature.OverlayAnalysis]: {
158157
defaultValue: false,
159158
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
160-
minimumVersion: CODEQL_OVERLAY_MINIMUM_VERSION,
159+
minimumVersion: undefined,
161160
},
162161
[Feature.OverlayAnalysisActions]: {
163162
defaultValue: false,

0 commit comments

Comments
 (0)