Merge branch '46903-osw-fix-permitted-params-filtering-on-merge-scheduling' into 'master'
Adjust permitted params filtering on merge scheduling Closes #46903 See merge request gitlab-org/gitlab-ce!19255
This commit is contained in:
commit
ec1d3e104a
3 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Adjust permitted params filtering on merge scheduling
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue