diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-05 17:19:05 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-05 17:19:05 +0400 |
commit | 362d82d10e217231cd607e932a64b3e9b48f67c8 (patch) | |
tree | 594796459c62df79527bab735d61d2af258e8d94 /db/fixtures/development | |
parent | 38d23c0e5f816937047c9326f9dd33fb10490032 (diff) |
Prevent same branch in MR seeds
Diffstat (limited to 'db/fixtures/development')
-rw-r--r-- | db/fixtures/development/10_merge_requests.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/db/fixtures/development/10_merge_requests.rb b/db/fixtures/development/10_merge_requests.rb index 4d0ec1e6da1..d122d96235e 100644 --- a/db/fixtures/development/10_merge_requests.rb +++ b/db/fixtures/development/10_merge_requests.rb @@ -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, [{ |