Commit 362d82d1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Prevent same branch in MR seeds

parent 38d23c0e
......@@ -22,9 +22,9 @@
= render "commits/commit", commit: commit
- else
%h5
%h4.nothing_here_message
Nothing to merge from
%span.label #{@merge_request.source_branch}
%span.label-branch #{@merge_request.source_branch}
to
%span.label #{@merge_request.target_branch}
%span.label-branch #{@merge_request.target_branch}
%br
......@@ -14,6 +14,8 @@ Gitlab::Seeder.quiet do
branches = project.repository.branch_names.sample(2)
next if branches.uniq.size < 2
user_id = user.id
MergeRequestObserver.current_user = user
MergeRequest.seed(:id, [{
......
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