Commit 738a5d2f authored by Sean McGivern's avatar Sean McGivern

Merge branch 'caw-remove-snippet-spam-flag' into 'master'

Remove snippet_spam feature flag

See merge request gitlab-org/gitlab!66118
parents 363d0d38 1304f57c
......@@ -20,14 +20,12 @@ module Snippets
@snippet.author = current_user
if Feature.enabled?(:snippet_spam)
Spam::SpamActionService.new(
spammable: @snippet,
spam_params: spam_params,
user: current_user,
action: :create
).execute
end
Spam::SpamActionService.new(
spammable: @snippet,
spam_params: spam_params,
user: current_user,
action: :create
).execute
if save_and_commit
UserAgentDetailService.new(spammable: @snippet, spam_params: spam_params).create
......
......@@ -23,14 +23,12 @@ module Snippets
update_snippet_attributes(snippet)
if Feature.enabled?(:snippet_spam)
Spam::SpamActionService.new(
spammable: snippet,
spam_params: spam_params,
user: current_user,
action: :update
).execute
end
Spam::SpamActionService.new(
spammable: snippet,
spam_params: spam_params,
user: current_user,
action: :update
).execute
if save_and_commit(snippet)
Gitlab::UsageDataCounters::SnippetCounter.count(:update)
......
---
name: snippet_spam
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44010
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/262013
milestone: '13.5'
type: development
group: group::editor
default_enabled: false
......@@ -22,18 +22,6 @@ RSpec.shared_examples 'checking spam' do
subject
end
context 'when snippet_spam flag is disabled' do
before do
stub_feature_flags(snippet_spam: false)
end
it 'request parameter is not passed to the service' do
expect(Spam::SpamActionService).not_to receive(:new)
subject
end
end
end
shared_examples 'invalid params error response' do
......
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