diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-10 15:05:57 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-10 15:05:57 +0300 |
commit | cf777261888cb4baccd03b3d1ca491cb5b1a65f3 (patch) | |
tree | f1b8b28c1295d58ad3fb875869a8cb03b6768421 /db/fixtures/development | |
parent | 1f5260719813a5d80a2f0d58430e37e8d3e99587 (diff) |
Make sure we're matching the same way.
Ruby's regular expression is unicode aware, therefore 'å' also
matches against /\p{alnum}/. If we want only ASCII-7bit, use
[a-zA-Z0-9]+ so they always match the same thing
Diffstat (limited to 'db/fixtures/development')
-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 ) |