File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ impl RepositoryStatsUpdater {
273
273
274
274
pub ( crate ) fn repository_name ( url : & str ) -> Option < RepositoryName > {
275
275
static RE : Lazy < Regex > = Lazy :: new ( || {
276
- Regex :: new ( r"https?://(?P<host>. +)/(?P<owner>[\w\._-]+)/(?P<repo>[\w\._-]+)" ) . unwrap ( )
276
+ Regex :: new ( r"https?://(?P<host>[^/] +)/(?P<owner>[\w\._/ -]+)/(?P<repo>[\w\._-]+)" ) . unwrap ( )
277
277
} ) ;
278
278
279
279
let cap = RE . captures ( url) ?;
@@ -328,6 +328,9 @@ mod test {
328
328
assert_name ! ( "https://gitlab.freedesktop.org/test/test" => (
329
329
"test" , "test" , "gitlab.freedesktop.org"
330
330
) ) ;
331
+ assert_name ! ( "https://gitlab.com/artgam3s/public-libraries/rust/rpa" => (
332
+ "artgam3s/public-libraries/rust" , "rpa" , "gitlab.com"
333
+ ) ) ;
331
334
332
335
// github checks
333
336
assert_name ! ( "https://github.com/onur/cratesfyi" => ( "onur" , "cratesfyi" , "github.com" ) ) ;
You can’t perform that action at this time.
0 commit comments