File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ async function setupPythonExtractor(
108108 await features . getValue (
109109 Feature . DisablePythonDependencyInstallationEnabled ,
110110 codeql ,
111+ ) ||
112+ await features . getValue (
113+ Feature . PythonDefaultIsToSkipDependencyInstallationEnabled ,
114+ codeql ,
111115 )
112116 ) {
113117 logger . warning (
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ export enum Feature {
4949 CppDependencyInstallation = "cpp_dependency_installation_enabled" ,
5050 DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled" ,
5151 DisablePythonDependencyInstallationEnabled = "disable_python_dependency_installation_enabled" ,
52+ // NOTE: `python_default_is_to_skip_dependency_installation_enabled` is never actually returned by the GitHub API.
53+ PythonDefaultIsToSkipDependencyInstallationEnabled = "python_default_is_to_skip_dependency_installation_enabled" ,
5254 EvaluatorFineGrainedParallelismEnabled = "evaluator_fine_grained_parallelism_enabled" ,
5355 ExportDiagnosticsEnabled = "export_diagnostics_enabled" ,
5456 QaTelemetryEnabled = "qa_telemetry_enabled" ,
@@ -103,6 +105,15 @@ export const featureConfig: Record<
103105 minimumVersion : undefined ,
104106 defaultValue : false ,
105107 } ,
108+ [ Feature . PythonDefaultIsToSkipDependencyInstallationEnabled ] : {
109+ // we can reuse the same environment variable as above. If someone has set it to
110+ // `true` in their workflow this means dependencies are not installed, setting it to
111+ // `false` means dependencies _will_ be installed. The same semantics are applied
112+ // here!
113+ envVar : "CODEQL_ACTION_DISABLE_PYTHON_DEPENDENCY_INSTALLATION" ,
114+ minimumVersion : "2.16.0" ,
115+ defaultValue : true ,
116+ } ,
106117} ;
107118
108119/**
Original file line number Diff line number Diff line change @@ -297,6 +297,10 @@ async function run() {
297297 await features . getValue (
298298 Feature . DisablePythonDependencyInstallationEnabled ,
299299 codeql ,
300+ ) ||
301+ await features . getValue (
302+ Feature . PythonDefaultIsToSkipDependencyInstallationEnabled ,
303+ codeql ,
300304 )
301305 ) {
302306 logger . info ( "Skipping python dependency installation" ) ;
@@ -450,6 +454,10 @@ async function run() {
450454 await features . getValue (
451455 Feature . DisablePythonDependencyInstallationEnabled ,
452456 codeql ,
457+ ) ||
458+ await features . getValue (
459+ Feature . PythonDefaultIsToSkipDependencyInstallationEnabled ,
460+ codeql ,
453461 )
454462 ) {
455463 core . exportVariable (
You can’t perform that action at this time.
0 commit comments