Commit 8b4ce154 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'id-put-target-projects-behind-ff' into 'master'

Put target projects calculation behind FF

See merge request gitlab-org/gitlab!56949
parents 6a285e4b f2b82762
......@@ -135,6 +135,8 @@ module CommitsHelper
end
def cherry_pick_projects_data(project)
return [] unless Feature.enabled?(:pick_into_project, project, default_enabled: :yaml)
target_projects(project).map do |project|
{
id: project.id.to_s,
......
......@@ -257,5 +257,15 @@ RSpec.describe CommitsHelper do
{ id: forked_project.id.to_s, name: forked_project.full_path, refsUrl: refs_project_path(forked_project) }
])
end
context 'pick_into_project is disabled' do
before do
stub_feature_flags(pick_into_project: false)
end
it 'does not calculate target projects' do
expect(helper.cherry_pick_projects_data(project)).to eq([])
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment