Commit 9f1a968b authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '34241-remove-git_push_execute_all_project_hooks-ff' into 'master'

Remove the git_push_execute_all_project_hooks feature flag

Closes #34241

See merge request gitlab-org/gitlab!27401
parents bcbfd29b dc8cd802
......@@ -35,7 +35,7 @@ module Git
end
def execute_project_hooks?(changes)
(changes.size <= Gitlab::CurrentSettings.push_event_hooks_limit) || Feature.enabled?(:git_push_execute_all_project_hooks, project)
changes.size <= Gitlab::CurrentSettings.push_event_hooks_limit
end
def process_changes(ref_type, action, changes, execute_project_hooks:)
......
......@@ -55,36 +55,14 @@ describe Git::ProcessRefChangesService do
stub_application_setting(push_event_hooks_limit: push_event_hooks_limit)
end
context 'git_push_execute_all_project_hooks is disabled' do
before do
stub_feature_flags(git_push_execute_all_project_hooks: false)
end
it "calls #{push_service_class} with execute_project_hooks set to false" do
expect(push_service_class)
.to receive(:new)
.with(project, project.owner, hash_including(execute_project_hooks: false))
.exactly(changes.count).times
.and_return(service)
subject.execute
end
end
context 'git_push_execute_all_project_hooks is enabled' do
before do
stub_feature_flags(git_push_execute_all_project_hooks: true)
end
it "calls #{push_service_class} with execute_project_hooks set to true" do
expect(push_service_class)
.to receive(:new)
.with(project, project.owner, hash_including(execute_project_hooks: true))
.exactly(changes.count).times
.and_return(service)
it "calls #{push_service_class} with execute_project_hooks set to false" do
expect(push_service_class)
.to receive(:new)
.with(project, project.owner, hash_including(execute_project_hooks: false))
.exactly(changes.count).times
.and_return(service)
subject.execute
end
subject.execute
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