Make sure different project gets a merge request
Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7237#note_21626479
This commit is contained in:
parent
406dfd6e0f
commit
eb242fc865
1 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue