Commit dc8cd802 authored by Nick Thomas's avatar Nick Thomas

Remove the git_push_execute_all_project_hooks feature flag

This *reverse* feature flag has been operating in production for at
least 6 months. It should be safe to remove.

Since there's no behaviour change with the removal of this flag, there
is no need for a changelog entry.
parent 72d37d24
...@@ -35,7 +35,7 @@ module Git ...@@ -35,7 +35,7 @@ module Git
end end
def execute_project_hooks?(changes) 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 end
def process_changes(ref_type, action, changes, execute_project_hooks:) def process_changes(ref_type, action, changes, execute_project_hooks:)
......
...@@ -55,36 +55,14 @@ describe Git::ProcessRefChangesService do ...@@ -55,36 +55,14 @@ describe Git::ProcessRefChangesService do
stub_application_setting(push_event_hooks_limit: push_event_hooks_limit) stub_application_setting(push_event_hooks_limit: push_event_hooks_limit)
end end
context 'git_push_execute_all_project_hooks is disabled' do it "calls #{push_service_class} with execute_project_hooks set to false" do
before do expect(push_service_class)
stub_feature_flags(git_push_execute_all_project_hooks: false) .to receive(:new)
end .with(project, project.owner, hash_including(execute_project_hooks: false))
.exactly(changes.count).times
it "calls #{push_service_class} with execute_project_hooks set to false" do .and_return(service)
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)
subject.execute subject.execute
end
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