Skip to content
Snippets Groups Projects
Commit eb242fc8 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Make sure different project gets a merge request

parent 406dfd6e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -93,8 +93,10 @@ module CreatesCommit
 
def create_merge_request?
# XXX: Even if the field is set, if we're checking the same branch
# as the target branch, we don't want to create a merge request.
params[:create_merge_request].present? && @ref != @target_branch
# as the target branch in the same project,
# we don't want to create a merge request.
params[:create_merge_request].present? &&
(different_project? || @ref != @target_branch)
end
 
# TODO: We should really clean this up
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment