summaryrefslogtreecommitdiff
path: root/lib/gitlab/regex.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-09-18 20:31:00 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-19 10:07:15 +0200
commit223041fa1bba534d613489f41d6143f1785fd0b4 (patch)
treeafacefd32c0ac7f7f8807ee51f36ed114b0f7474 /lib/gitlab/regex.rb
parent99f1385ee02a368e8fa7cc0bcaad78b904d1a81d (diff)
downloadgitlab-ce-223041fa1bba534d613489f41d6143f1785fd0b4.tar.gz
Fix environments handling
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r--lib/gitlab/regex.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index d1a3e54ccd7..4efd9ae2c1e 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -96,11 +96,11 @@ module Gitlab
end
def environment_name_regex
- git_reference_regex
+ @environment_name_regex ||= /\A[a-zA-Z0-9_\\\/\${} -]+\z/.freeze
end
def environment_name_regex_message
- "be a valid git reference name"
+ "can contain only letters, digits, '-', '_', '/', '$', '{', '}' and spaces"
end
end
end