r-lib / pkgdepends

R Package Dependency Resolution
https://r-lib.github.io/pkgdepends/
Other
102 stars 30 forks source link

Incorrect parse result of gitlab ref #328

Closed pawelru closed 7 months ago

pawelru commented 1 year ago
pkgdepends::parse_pkg_ref("gitlab::https://foo.bar.com/aa/bb/cc")
#> $package
#> [1] "aa"
#> 
#> $protocol
#> [1] "https"
#> 
#> $host
#> [1] "foo.bar.co"
#> 
#> $username
#> [1] "m"
#> 
#> $repo
#> [1] "aa"
#> 
#> $subdir
#> [1] "bb/cc"
#> 
#> $commitish
#> [1] "HEAD"
#> 
#> $ref
#> [1] "gitlab::https://foo.bar.com/aa/bb/cc"
#> 
#> $path
#> [1] "/m/"
#> 
#> $dotgit
#> [1] ""
#> 
#> $url
#> [1] "https://foo.bar.co/m/aa.git"
#> 
#> $type
#> [1] "gitlab"
#> 
#> $params
#> character(0)
#> 
#> attr(,"class")
#> [1] "remote_ref_gitlab" "remote_ref"        "list"

Created on 2023-08-02 with reprex v2.0.2

Please have a look at host and username elements.