Commit d71b86ca authored by Nick Thomas's avatar Nick Thomas 💃

Fix a rubocop complaint

parent 2d549f5b
Pipeline #90210787 passed with stages
in 89 minutes and 22 seconds
......@@ -10,11 +10,13 @@ module MergeRequests
# TODO: this should handle all quick actions that don't have side effects
# https://gitlab.com/gitlab-org/gitlab-foss/issues/53658
merge_quick_actions_into_params!(merge_request, only: [:target_branch])
if params.has_key?(:force_remove_source_branch)
merge_request.merge_params['force_remove_source_branch'] = params.delete(:force_remove_source_branch)
else
merge_request.merge_params['force_remove_source_branch'] = project.remove_source_branch_after_merge?
end
merge_request.merge_params['force_remove_source_branch'] =
if params.key?(:force_remove_source_branch)
params.delete(:force_remove_source_branch)
else
project.remove_source_branch_after_merge?
end
# Assign the projects first so we can use policies for `filter_params`
merge_request.author = current_user
......
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