From 6e69a927f6c776cd32b43e7d9b3ff5b5a129a45b Mon Sep 17 00:00:00 2001 From: Chuan-kai Lin Date: Mon, 22 Sep 2025 13:35:21 -0700 Subject: [PATCH] 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. --- src/config-utils.ts | 9 +++------ src/feature-flags.ts | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/config-utils.ts b/src/config-utils.ts index fe4b392ab..448b24184 100644 --- a/src/config-utils.ts +++ b/src/config-utils.ts @@ -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; } diff --git a/src/feature-flags.ts b/src/feature-flags.ts index 2938f5108..423ca1272 100644 --- a/src/feature-flags.ts +++ b/src/feature-flags.ts @@ -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,