Commit c8a30e3d authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Adjust permitted params filtering on merge scheduling

parent 439adb96
...@@ -296,14 +296,14 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -296,14 +296,14 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
elsif @merge_request.actual_head_pipeline.success? elsif @merge_request.actual_head_pipeline.success?
# This can be triggered when a user clicks the auto merge button while # This can be triggered when a user clicks the auto merge button while
# the tests finish at about the same time # 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 :success
else else
:failed :failed
end end
else else
@merge_request.merge_async(current_user.id, params) @merge_request.merge_async(current_user.id, merge_params)
:success :success
end end
......
---
title: Adjust permitted params filtering on merge scheduling
merge_request:
author:
type: fixed
...@@ -326,8 +326,8 @@ describe Projects::MergeRequestsController do ...@@ -326,8 +326,8 @@ describe Projects::MergeRequestsController do
expect(json_response).to eq('status' => 'success') expect(json_response).to eq('status' => 'success')
end end
it 'starts the merge immediately' do it 'starts the merge immediately with permitted params' do
expect(MergeWorker).to receive(:perform_async).with(merge_request.id, anything, anything) expect(MergeWorker).to receive(:perform_async).with(merge_request.id, anything, { 'squash' => false })
merge_with_sha merge_with_sha
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment