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.
This commit is contained in:
Chuan-kai Lin
2025-09-22 13:35:21 -07:00
parent 6a87ebe42b
commit 6e69a927f6
2 changed files with 4 additions and 8 deletions
+3 -6
View File
@@ -600,21 +600,18 @@ async function isOverlayAnalysisFeatureEnabled(
if (!["github", "dsp-testing"].includes(repository.owner)) {
return false;
}
if (!(await features.getValue(Feature.OverlayAnalysis, codeql))) {
if (!(await features.getValue(Feature.OverlayAnalysis))) {
return false;
}
let enableForCodeScanningOnly = false;
for (const language of languages) {
const feature = OVERLAY_ANALYSIS_FEATURES[language];
if (feature && (await features.getValue(feature, codeql))) {
if (feature && (await features.getValue(feature))) {
continue;
}
const codeScanningFeature =
OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES[language];
if (
codeScanningFeature &&
(await features.getValue(codeScanningFeature, codeql))
) {
if (codeScanningFeature && (await features.getValue(codeScanningFeature))) {
enableForCodeScanningOnly = true;
continue;
}
+1 -2
View File
@@ -7,7 +7,6 @@ import { getApiClient } from "./api-client";
import type { CodeQL } from "./codeql";
import * as defaults from "./defaults.json";
import { Logger } from "./logging";
import { CODEQL_OVERLAY_MINIMUM_VERSION } from "./overlay-database-utils";
import { RepositoryNwo } from "./repository";
import { ToolsFeature } from "./tools-features";
import * as util from "./util";
@@ -157,7 +156,7 @@ export const featureConfig: Record<
[Feature.OverlayAnalysis]: {
defaultValue: false,
envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS",
minimumVersion: CODEQL_OVERLAY_MINIMUM_VERSION,
minimumVersion: undefined,
},
[Feature.OverlayAnalysisActions]: {
defaultValue: false,