[go: up one dir, main page]

Draft: refactor: remove unused _build parameter

Relates to issue #584326

Changes

This MR removes the unused _build parameter from the pipeline_execution_policy_build? method in both CE and EE versions.

1. CE Version (lib/gitlab/ci/pipeline/chain/set_build_sources.rb)

  • Before: def pipeline_execution_policy_build?(_build)
  • After: def pipeline_execution_policy_build?

2. EE Version (ee/lib/ee/gitlab/ci/pipeline/chain/set_build_sources.rb)

  • Before: def pipeline_execution_policy_build?(_build)
  • After: def pipeline_execution_policy_build?

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, making the _build parameter unnecessary.

Note: The caller on line 11 still passes the job argument when calling pipeline_execution_policy_build?(job), but Ruby allows calling a method with more arguments than it accepts, maintaining backward compatibility.

Edited by Surabhi Suman

Merge request reports

Loading