Commit 6b246360 authored by Robert Speicher's avatar Robert Speicher

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
parents 37a56324 43b0dddf
......@@ -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!(
......
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