Commit 5775770a authored by Mark Chao's avatar Mark Chao

Merge branch '349131-release-chat_notification_deployment_protected_branch_filter' into 'master'

Release chat notification branch filter for deployments

See merge request gitlab-org/gitlab!82583
parents b5f62689 ad9573df
......@@ -241,7 +241,6 @@ module Integrations
def notify_for_ref?(data)
return true if data[:object_kind] == 'tag_push'
return true if data[:object_kind] == 'deployment' && !Feature.enabled?(:chat_notification_deployment_protected_branch_filter, project)
ref = data[:ref] || data.dig(:object_attributes, :ref)
return true if ref.blank? # No need to check protected branches when there is no ref
......
---
name: chat_notification_deployment_protected_branch_filter
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74423
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/349131
milestone: '14.7'
type: development
group: group::integrations
default_enabled: false
......@@ -692,16 +692,6 @@ RSpec.shared_examples Integrations::SlackMattermostNotifier do |integration_name
context 'notification enabled for all branches' do
it_behaves_like "triggered #{integration_name} integration", event_type: "pipeline", branches_to_be_notified: "all"
end
context 'when chat_notification_deployment_protected_branch_filter is disabled' do
before do
stub_feature_flags(chat_notification_deployment_protected_branch_filter: false)
end
context 'notification enabled only for default branch' do
it_behaves_like "triggered #{integration_name} integration", event_type: "pipeline", branches_to_be_notified: "default"
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