diff options
author | Robert Speicher <robert@gitlab.com> | 2018-04-11 00:22:49 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-04-11 00:22:49 +0000 |
commit | 6b246360d4ef358cced8b2c698a1d00f97a2e780 (patch) | |
tree | 07d908de36689d657e11eeb78188173d867c34b4 /db | |
parent | 37a5632483b67ddcfa4c535cc911319b25f01fb5 (diff) | |
parent | 43b0dddf3859887b78569b832dd9a820ea66d652 (diff) | |
download | gitlab-ce-6b246360d4ef358cced8b2c698a1d00f97a2e780.tar.gz |
Merge branch 'zj-fix-environments-fixtures' into 'master'
Fix enviroments seeding on certain branch names
Closes #45051
See merge request gitlab-org/gitlab-ce!18263
Diffstat (limited to 'db')
-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!( |