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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
c8a30e3d
Commit
c8a30e3d
authored
May 30, 2018
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust permitted params filtering on merge scheduling
parent
439adb96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-2
changelogs/unreleased/46903-osw-fix-permitted-params-filtering-on-merge-scheduling.yml
...sw-fix-permitted-params-filtering-on-merge-scheduling.yml
+5
-0
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+2
-2
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
c8a30e3d
...
...
@@ -296,14 +296,14 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
elsif
@merge_request
.
actual_head_pipeline
.
success?
# This can be triggered when a user clicks the auto merge button while
# the tests finish at about the same time
@merge_request
.
merge_async
(
current_user
.
id
,
params
)
@merge_request
.
merge_async
(
current_user
.
id
,
merge_
params
)
:success
else
:failed
end
else
@merge_request
.
merge_async
(
current_user
.
id
,
params
)
@merge_request
.
merge_async
(
current_user
.
id
,
merge_
params
)
:success
end
...
...
changelogs/unreleased/46903-osw-fix-permitted-params-filtering-on-merge-scheduling.yml
0 → 100644
View file @
c8a30e3d
---
title
:
Adjust permitted params filtering on merge scheduling
merge_request
:
author
:
type
:
fixed
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
c8a30e3d
...
...
@@ -326,8 +326,8 @@ describe Projects::MergeRequestsController do
expect
(
json_response
).
to
eq
(
'status'
=>
'success'
)
end
it
'starts the merge immediately'
do
expect
(
MergeWorker
).
to
receive
(
:perform_async
).
with
(
merge_request
.
id
,
anything
,
anything
)
it
'starts the merge immediately
with permitted params
'
do
expect
(
MergeWorker
).
to
receive
(
:perform_async
).
with
(
merge_request
.
id
,
anything
,
{
'squash'
=>
false
}
)
merge_with_sha
end
...
...
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