diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /lib/gitlab/regex.rb | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index a88ef5fe73e..8b2f786a91a 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -131,7 +131,7 @@ module Gitlab end def helm_channel_regex - @helm_channel_regex ||= %r{\A[-\.\_a-zA-Z0-9]+\z}.freeze + @helm_channel_regex ||= %r{\A([a-zA-Z0-9](\.|-|_)?){1,255}(?<!\.|-|_)\z}.freeze end def helm_package_regex @@ -220,12 +220,12 @@ module Gitlab # The character range \p{Alnum} overlaps with \u{00A9}-\u{1f9ff} # hence the Ruby warning. # https://gitlab.com/gitlab-org/gitlab/merge_requests/23165#not-easy-fixable - @project_name_regex ||= /\A[\p{Alnum}\u{00A9}-\u{1f9ff}_][\p{Alnum}\p{Pd}\u{00A9}-\u{1f9ff}_\. ]*\z/.freeze + @project_name_regex ||= /\A[\p{Alnum}\u{00A9}-\u{1f9ff}_][\p{Alnum}\p{Pd}\u{002B}\u{00A9}-\u{1f9ff}_\. ]*\z/.freeze end def project_name_regex_message - "can contain only letters, digits, emojis, '_', '.', dash, space. " \ - "It must start with letter, digit, emoji or '_'." + "can contain only letters, digits, emojis, '_', '.', '+', dashes, or spaces. " \ + "It must start with a letter, digit, emoji, or '_'." end def group_name_regex @@ -409,7 +409,7 @@ module Gitlab end def merge_request_draft - /\A(?i)(\[draft\]|\(draft\)|draft:|draft\s\-\s|draft\z)/ + /\A(?i)(\[draft\]|\(draft\)|draft:)/ end def issue |