diff options
Diffstat (limited to 'db/fixtures/development/19_environments.rb')
-rw-r--r-- | db/fixtures/development/19_environments.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/fixtures/development/19_environments.rb b/db/fixtures/development/19_environments.rb index c1bbc9af6d6..00a14f458d1 100644 --- a/db/fixtures/development/19_environments.rb +++ b/db/fixtures/development/19_environments.rb @@ -28,7 +28,11 @@ class Gitlab::Seeder::Environments end def create_merge_request_review_deployments! - @project.merge_requests.sample(4).map do |merge_request| + @project + .merge_requests + .select { |mr| mr.source_branch.match(/\p{Alnum}+/) } + .sample(4) + .each do |merge_request| next unless merge_request.diff_head_sha create_deployment!( |