Permalink
Browse files

Prevent same branch in MR seeds

  • Loading branch information...
1 parent 38d23c0 commit 362d82d10e217231cd607e932a64b3e9b48f67c8 @randx randx committed Apr 5, 2013
@@ -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 @@
branches = project.repository.branch_names.sample(2)
+ next if branches.uniq.size < 2
+
user_id = user.id
MergeRequestObserver.current_user = user
MergeRequest.seed(:id, [{

0 comments on commit 362d82d

Please sign in to comment.