@@ -6,6 +6,7 @@ import * as semver from "semver";
66import { getApiClient } from "./api-client" ;
77import type { CodeQL } from "./codeql" ;
88import * as defaults from "./defaults.json" ;
9+ import { Feature } from "./feature-flags/features" ;
910import { Logger } from "./logging" ;
1011import {
1112 CODEQL_OVERLAY_MINIMUM_VERSION ,
@@ -21,6 +22,8 @@ import { RepositoryNwo } from "./repository";
2122import { ToolsFeature } from "./tools-features" ;
2223import * as util from "./util" ;
2324
25+ export { Feature } from "./feature-flags/features" ;
26+
2427const DEFAULT_VERSION_FEATURE_FLAG_PREFIX = "default_codeql_version_" ;
2528const DEFAULT_VERSION_FEATURE_FLAG_SUFFIX = "_enabled" ;
2629
@@ -61,107 +64,6 @@ export interface CodeQLDefaultVersionInfo {
6164 toolsFeatureFlagsValid ?: boolean ;
6265}
6366
64- /**
65- * Features as named by the GitHub API endpoint.
66- *
67- * Do not include the `codeql_action_` prefix as this is stripped by the API
68- * endpoint.
69- *
70- * Legacy features should end with `_enabled`.
71- */
72- export enum Feature {
73- /** Allows supported properties of configuration files to be merged. */
74- AllowMergeConfigFiles = "allow_merge_config_files" ,
75- /** Controls whether we allow multiple values for the `analysis-kinds` input. */
76- AllowMultipleAnalysisKinds = "allow_multiple_analysis_kinds" ,
77- /**
78- * Whether to check for unsupported traced analysis. Primarily intended as an override to disable
79- * the check if it causes problems somehow.
80- */
81- CheckUnsupportedTracedAnalysis = "check_unsupported_traced_analysis" ,
82- /** Whether to allow the `config-file` input to be specified via a repository property. */
83- ConfigFileRepositoryProperty = "config_file_repository_property" ,
84- CppDependencyInstallation = "cpp_dependency_installation_enabled" ,
85- CsharpCacheBuildModeNone = "csharp_cache_bmn" ,
86- CsharpNewCacheKey = "csharp_new_cache_key" ,
87- DiffInformedQueries = "diff_informed_queries" ,
88- DisableCsharpBuildless = "disable_csharp_buildless" ,
89- DisableJavaBuildlessEnabled = "disable_java_buildless_enabled" ,
90- DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled" ,
91- ExportDiagnosticsEnabled = "export_diagnostics_enabled" ,
92- /**
93- * Emergency override that forces the CodeQL CLI to use the JGit-based Git backend instead of its
94- * default backend selection.
95- */
96- ForceJGit = "force_jgit" ,
97- ForceNightly = "force_nightly" ,
98- IgnoreGeneratedFiles = "ignore_generated_files" ,
99- JavaNetworkDebugging = "java_network_debugging" ,
100- OverlayAnalysis = "overlay_analysis" ,
101- OverlayAnalysisCodeScanningCpp = "overlay_analysis_code_scanning_cpp" ,
102- OverlayAnalysisCodeScanningCsharp = "overlay_analysis_code_scanning_csharp" ,
103- OverlayAnalysisCodeScanningGo = "overlay_analysis_code_scanning_go" ,
104- OverlayAnalysisCodeScanningJava = "overlay_analysis_code_scanning_java" ,
105- OverlayAnalysisCodeScanningJavascript = "overlay_analysis_code_scanning_javascript" ,
106- OverlayAnalysisCodeScanningPython = "overlay_analysis_code_scanning_python" ,
107- OverlayAnalysisCodeScanningRuby = "overlay_analysis_code_scanning_ruby" ,
108- OverlayAnalysisCpp = "overlay_analysis_cpp" ,
109- OverlayAnalysisCsharp = "overlay_analysis_csharp" ,
110- OverlayAnalysisGo = "overlay_analysis_go" ,
111- OverlayAnalysisJava = "overlay_analysis_java" ,
112- OverlayAnalysisJavascript = "overlay_analysis_javascript" ,
113- /**
114- * Lowers the overlay minimum available disk space to 8 GB. The lowest enabled limit wins; if
115- * none are enabled, the default applies.
116- */
117- OverlayAnalysisMinDisk8Gb = "overlay_analysis_min_disk_8_gb" ,
118- /**
119- * Lowers the overlay minimum available disk space to 9 GB. The lowest enabled limit wins; if
120- * none are enabled, the default applies.
121- */
122- OverlayAnalysisMinDisk9Gb = "overlay_analysis_min_disk_9_gb" ,
123- /**
124- * Lowers the overlay minimum available disk space to 10 GB. The lowest enabled limit wins; if
125- * none are enabled, the default applies.
126- */
127- OverlayAnalysisMinDisk10Gb = "overlay_analysis_min_disk_10_gb" ,
128- /**
129- * Lowers the overlay minimum available disk space to 11 GB. The lowest enabled limit wins; if
130- * none are enabled, the default applies.
131- */
132- OverlayAnalysisMinDisk11Gb = "overlay_analysis_min_disk_11_gb" ,
133- /**
134- * Lowers the overlay minimum available disk space to 12 GB. The lowest enabled limit wins; if
135- * none are enabled, the default applies.
136- */
137- OverlayAnalysisMinDisk12Gb = "overlay_analysis_min_disk_12_gb" ,
138- /**
139- * Lowers the overlay minimum available disk space to 13 GB. The lowest enabled limit wins; if
140- * none are enabled, the default applies.
141- */
142- OverlayAnalysisMinDisk13Gb = "overlay_analysis_min_disk_13_gb" ,
143- OverlayAnalysisPython = "overlay_analysis_python" ,
144- OverlayAnalysisRuby = "overlay_analysis_ruby" ,
145- /** Controls whether hardware checks are skipped for overlay analysis. */
146- OverlayAnalysisSkipResourceChecks = "overlay_analysis_skip_resource_checks" ,
147- /** Controls whether the Actions cache is checked for overlay build outcomes. */
148- OverlayAnalysisStatusCheck = "overlay_analysis_status_check" ,
149- /** Controls whether overlay build failures on the default branch are stored in the Actions cache. */
150- OverlayAnalysisStatusSave = "overlay_analysis_status_save" ,
151- QaTelemetryEnabled = "qa_telemetry_enabled" ,
152- /** Whether we should fail early if we detect that traced analysis is unsupported. */
153- AbortUnsupportedTracedAnalysis = "abort_unsupported_traced_analysis" ,
154- /** Routes (some) API requests through the registry proxy. */
155- ProxyApiRequests = "proxy_api_requests" ,
156- /** Note that this currently only disables baseline file coverage information. */
157- SkipFileCoverageOnPrs = "skip_file_coverage_on_prs" ,
158- StartProxyUseFeaturesRelease = "start_proxy_use_features_release" ,
159- /** Whether to allow the `tools` input to be specified via a repository property. */
160- ToolsRepositoryProperty = "tools_repository_property" ,
161- UploadOverlayDbToApi = "upload_overlay_db_to_api" ,
162- ValidateDbConfig = "validate_db_config" ,
163- }
164-
16567export type FeatureConfig = {
16668 /**
16769 * Default value in environments where the feature flags API is not available,
0 commit comments