Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1304f57c
Commit
1304f57c
authored
Jul 13, 2021
by
Chad Woolley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove snippet_spam feature flag
Changelog: changed
parent
0f7ff2a9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
36 deletions
+12
-36
app/services/snippets/create_service.rb
app/services/snippets/create_service.rb
+6
-8
app/services/snippets/update_service.rb
app/services/snippets/update_service.rb
+6
-8
config/feature_flags/development/snippet_spam.yml
config/feature_flags/development/snippet_spam.yml
+0
-8
spec/support/shared_examples/services/snippets_shared_examples.rb
...port/shared_examples/services/snippets_shared_examples.rb
+0
-12
No files found.
app/services/snippets/create_service.rb
View file @
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
...
...
app/services/snippets/update_service.rb
View file @
1304f57c
...
...
@@ -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
)
...
...
config/feature_flags/development/snippet_spam.yml
deleted
100644 → 0
View file @
0f7ff2a9
---
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
spec/support/shared_examples/services/snippets_shared_examples.rb
View file @
1304f57c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment