From 15b83bf320230df3f5d831252c1a0db0b7686bcb Mon Sep 17 00:00:00 2001 From: Duo Developer Date: Wed, 17 Dec 2025 12:35:19 +0000 Subject: [PATCH] refactor: Remove unused _build parameter from pipeline_execution_policy_build? The _build parameter was not being used in the method implementation. The method determines if a build is a pipeline execution policy build by checking the pipeline context state (creating_policy_pipeline?) rather than inspecting the build object itself. Updated both CE and EE versions to remove the unused parameter. --- ee/lib/ee/gitlab/ci/pipeline/chain/set_build_sources.rb | 2 +- lib/gitlab/ci/pipeline/chain/set_build_sources.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/lib/ee/gitlab/ci/pipeline/chain/set_build_sources.rb b/ee/lib/ee/gitlab/ci/pipeline/chain/set_build_sources.rb index 3e41880f25212b..fe2b4698303878 100644 --- a/ee/lib/ee/gitlab/ci/pipeline/chain/set_build_sources.rb +++ b/ee/lib/ee/gitlab/ci/pipeline/chain/set_build_sources.rb @@ -9,7 +9,7 @@ module SetBuildSources extend ::Gitlab::Utils::Override override :pipeline_execution_policy_build? - def pipeline_execution_policy_build?(_build) + def pipeline_execution_policy_build? command.pipeline_policy_context.pipeline_execution_context.creating_policy_pipeline? end diff --git a/lib/gitlab/ci/pipeline/chain/set_build_sources.rb b/lib/gitlab/ci/pipeline/chain/set_build_sources.rb index 1c0f386d90b033..90043b17373e06 100644 --- a/lib/gitlab/ci/pipeline/chain/set_build_sources.rb +++ b/lib/gitlab/ci/pipeline/chain/set_build_sources.rb @@ -28,7 +28,7 @@ def break? private # Overridden in EE - def pipeline_execution_policy_build?(_build) + def pipeline_execution_policy_build? false end -- GitLab