diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-19 14:31:47 +0200 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-06-19 14:31:47 +0200 |
commit | 2562a5c3aca30800c045a2ec4bce18477d4c5008 (patch) | |
tree | a387fa0a60239a3077031c0102a97c292c6e0a97 /lib | |
parent | 9fe6c2b2c2dd92831c93297021b41d6721e4b201 (diff) | |
download | gitlab-ce-zj-environment-creation-regex-fix.tar.gz |
Allow % and ' as valid chars in environment nameszj-environment-creation-regex-fix
Lacking this was preventing users from initializing environment names
which mapped 1-on-1 with branch names when seeding using `gitlab-test`
as repository.
No docs needed update, at least from what I could grep.
Fixes gitlab-org/gitlab-ce#30855
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/regex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index e4d2a992470..4d622a60a40 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -39,11 +39,11 @@ module Gitlab end def environment_name_regex - @environment_name_regex ||= /\A[a-zA-Z0-9_\\\/\${}. -]+\z/.freeze + @environment_name_regex ||= /\A[a-zA-Z0-9_\\\/\${}. -%']+\z/.freeze end def environment_name_regex_message - "can contain only letters, digits, '-', '_', '/', '$', '{', '}', '.' and spaces" + "can contain only letters, digits, '-', '_', '/', '$', '{', '}', '.', '%', ''' and spaces" end def kubernetes_namespace_regex |