diff options
author | Nick Thomas <nick@gitlab.com> | 2018-07-11 13:22:31 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-07-11 13:22:31 +0000 |
commit | fa6ef45555b78e4b972a30dadb5e6ec2e36b0aa7 (patch) | |
tree | ec8253348deb5318ee37b3c0871da24312685fa1 | |
parent | 5f12cdf5f62af1a809b3ffbc1995f129f8916c01 (diff) | |
parent | cf777261888cb4baccd03b3d1ca491cb5b1a65f3 (diff) | |
download | gitlab-ce-fa6ef45555b78e4b972a30dadb5e6ec2e36b0aa7.tar.gz |
Merge branch 'make-sure-env-name-not-ending-in-slash' into 'master'
Avoid building potential invalid environment name while seeding
See merge request gitlab-org/gitlab-ce!20523
-rw-r--r-- | db/fixtures/development/19_environments.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/fixtures/development/19_environments.rb b/db/fixtures/development/19_environments.rb index 00a14f458d1..65089f6ba4e 100644 --- a/db/fixtures/development/19_environments.rb +++ b/db/fixtures/development/19_environments.rb @@ -30,14 +30,14 @@ class Gitlab::Seeder::Environments def create_merge_request_review_deployments! @project .merge_requests - .select { |mr| mr.source_branch.match(/\p{Alnum}+/) } + .select { |mr| mr.source_branch.match(/[^a-zA-Z0-9]+/) } .sample(4) .each do |merge_request| next unless merge_request.diff_head_sha create_deployment!( merge_request.source_project, - "review/#{merge_request.source_branch.gsub(/[^a-zA-Z0-9]/, '')}", + "review/#{merge_request.source_branch.gsub(/[^a-zA-Z0-9]+/, '')}", merge_request.source_branch, merge_request.diff_head_sha ) |