Commit 61a72bc2e22548e7c216cf4499ced0841ff521cf

Authored by mk
1 parent 0004aafe

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 +7,7 @@ module Gitlab
7 end 7 end
8 8
9 def project_name_regex 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 end 11 end
12 12
13 def name_regex 13 def name_regex
@@ -49,7 +49,7 @@ module Gitlab @@ -49,7 +49,7 @@ module Gitlab
49 protected 49 protected
50 50
51 def default_regex 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 end 53 end
54 end 54 end
55 end 55 end