Commit 754f4ca7 authored by Stan Hu's avatar Stan Hu

Merge branch '207123-remove-sub_group_webhooks-feature-flag' into 'master'

Remove sub_group_webhooks feature flag

See merge request gitlab-org/gitlab!26070
parents 7e83ecf9 fcd37268
......@@ -756,8 +756,6 @@ module EE
private
def group_hooks
return group.hooks unless ::Feature.enabled?(:sub_group_webhooks, self)
GroupHook.where(group_id: group.self_and_ancestors)
end
......
---
title: Activate triggering webhooks from a subgroup feature
merge_request: 26070
author:
type: added
......@@ -631,14 +631,6 @@ describe Project do
it_behaves_like 'returns nil when the feature is not available'
it { is_expected.to eq(true) }
context 'when sub_group_webhooks feature flag is disabled' do
before do
stub_feature_flags(sub_group_webhooks: false)
end
it { is_expected.to eq(false) }
end
end
end
end
......@@ -677,32 +669,12 @@ describe Project do
it_behaves_like 'triggering group webhook'
context 'when sub_group_webhooks feature flag is disabled' do
before do
stub_feature_flags(sub_group_webhooks: false)
end
it_behaves_like 'triggering group webhook'
end
context 'in sub group' do
let(:sub_group) { create :group, parent: group }
let(:sub_sub_group) { create :group, parent: sub_group }
let(:project) { create(:project, namespace: sub_sub_group) }
it_behaves_like 'triggering group webhook'
context 'when sub_group_webhooks feature flag is disabled' do
before do
stub_feature_flags(sub_group_webhooks: false)
end
it 'does not execute the hook' do
expect(WebHookService).not_to receive(:new).with(group_hook, { some: 'info' }, 'push_hooks')
project.execute_hooks(some: 'info')
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