Commit 0ec86af8 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '60305-fix-mr-assignee-for-mr-push-options' into 'master'

Fix MR assignees for push options

Closes #60305

See merge request gitlab-org/gitlab-ce!27186
parents 948a4ee6 f9b4d5ef
......@@ -100,7 +100,7 @@ module MergeRequests
merge_request = ::MergeRequests::CreateService.new(
project,
current_user,
merge_request.attributes
merge_request.attributes.merge(assignees: merge_request.assignees)
).execute
end
......@@ -119,7 +119,7 @@ module MergeRequests
def create_params(branch)
params = {
assignee: current_user,
assignees: [current_user],
source_branch: branch,
source_project: project,
target_branch: push_options[:target] || target_project.default_branch,
......
......@@ -38,7 +38,7 @@ describe MergeRequests::PushOptionsHandlerService do
it 'assigns the MR to the user' do
service.execute
expect(last_mr.assignee).to eq(user)
expect(last_mr.assignees).to contain_exactly(user)
end
context 'when project has been forked' do
......
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