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
276ae4aa
Commit
276ae4aa
authored
May 22, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
98496961
fb83b82c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
18 deletions
+9
-18
changelogs/unreleased/60250-remove-mr_push_options-flag.yml
changelogs/unreleased/60250-remove-mr_push_options-flag.yml
+5
-0
lib/api/helpers/internal_helpers.rb
lib/api/helpers/internal_helpers.rb
+2
-0
lib/api/internal.rb
lib/api/internal.rb
+2
-6
spec/requests/api/internal_spec.rb
spec/requests/api/internal_spec.rb
+0
-12
No files found.
changelogs/unreleased/60250-remove-mr_push_options-flag.yml
0 → 100644
View file @
276ae4aa
---
title
:
Remove the mr_push_options feature flag
merge_request
:
28278
author
:
type
:
changed
lib/api/helpers/internal_helpers.rb
View file @
276ae4aa
...
...
@@ -46,6 +46,8 @@ module API
def
process_mr_push_options
(
push_options
,
project
,
user
,
changes
)
output
=
{}
Gitlab
::
QueryLimiting
.
whitelist
(
'https://gitlab.com/gitlab-org/gitlab-ce/issues/61359'
)
service
=
::
MergeRequests
::
PushOptionsHandlerService
.
new
(
project
,
user
,
...
...
lib/api/internal.rb
View file @
276ae4aa
...
...
@@ -264,12 +264,8 @@ module API
PostReceive
.
perform_async
(
params
[
:gl_repository
],
params
[
:identifier
],
params
[
:changes
],
push_options
.
as_json
)
if
Feature
.
enabled?
(
:mr_push_options
,
default_enabled:
true
)
Gitlab
::
QueryLimiting
.
whitelist
(
'https://gitlab.com/gitlab-org/gitlab-ce/issues/61359'
)
mr_options
=
push_options
.
get
(
:merge_request
)
output
.
merge!
(
process_mr_push_options
(
mr_options
,
project
,
user
,
params
[
:changes
]))
if
mr_options
.
present?
end
mr_options
=
push_options
.
get
(
:merge_request
)
output
.
merge!
(
process_mr_push_options
(
mr_options
,
project
,
user
,
params
[
:changes
]))
if
mr_options
.
present?
broadcast_message
=
BroadcastMessage
.
current
&
.
last
&
.
message
reference_counter_decreased
=
Gitlab
::
ReferenceCounter
.
new
(
params
[
:gl_repository
]).
decrease
...
...
spec/requests/api/internal_spec.rb
View file @
276ae4aa
...
...
@@ -997,18 +997,6 @@ describe API::Internal do
expect
(
json_response
[
'warnings'
]).
to
eq
(
'Error encountered with push options \'merge_request.create\': my error'
)
end
context
'when the feature is disabled'
do
it
'does not invoke MergeRequests::PushOptionsHandlerService'
do
stub_feature_flags
(
mr_push_options:
false
)
expect
(
MergeRequests
::
PushOptionsHandlerService
).
not_to
receive
(
:new
)
expect
do
post
api
(
'/internal/post_receive'
),
params:
valid_params
end
.
not_to
change
{
MergeRequest
.
count
}
end
end
end
context
'broadcast message exists'
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