Commit 61a72bc2e22548e7c216cf4499ced0841ff521cf
1 parent
0004aafe
Exists in
spb-stable
and in
3 other branches
Allow underscore as the first char for project names.
Not sure if the default_regex really has to be expanded for this special use case. We tried to extend only the project_name_regex first, but that didn't help.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/gitlab/regex.rb
| ... | ... | @@ -7,7 +7,7 @@ module Gitlab |
| 7 | 7 | end |
| 8 | 8 | |
| 9 | 9 | def project_name_regex |
| 10 | - /\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/ | |
| 10 | + /\A[a-zA-Z0-9_][a-zA-Z0-9_\-\. ]*\z/ | |
| 11 | 11 | end |
| 12 | 12 | |
| 13 | 13 | def name_regex |
| ... | ... | @@ -49,7 +49,7 @@ module Gitlab |
| 49 | 49 | protected |
| 50 | 50 | |
| 51 | 51 | def default_regex |
| 52 | - /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ | |
| 52 | + /\A[.?]?[a-zA-Z0-9_][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ | |
| 53 | 53 | end |
| 54 | 54 | end |
| 55 | 55 | end | ... | ... |