BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-2
46903-osw-fix-permitted-params-filtering-on-merge-scheduling.yml
...sw-fix-permitted-params-filtering-on-merge-scheduling.yml
+5
-0
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