| |
@@ -28,7 +28,7 @@
|
| |
-- remove eventual protocol prefix
|
| |
goname = string.gsub(goname, "^http(s?)://", "")
|
| |
-- remove eventual .git suffix
|
| |
- goname = string.gsub(goname, "%.git/*", "")
|
| |
+ goname = string.gsub(goname, "%.git/+", "")
|
| |
-- remove eventual git. prefix
|
| |
goname = string.gsub(goname, "^git%.", "")
|
| |
-- remove FQDN root (.com, .org, etc)
|
| |
The intention is to remove the
.git
that may be added to, e.g., GitHub repository URLs. If there's a/v2
or similar after, then we want to match a slash with the suffix. If the suffix is at the end, then the earlier code would have appended a slash anyway, and so we still want to match a slash.Allowing
.git
without slash incorrectly catches things like the middle ofcode.gitea.com
. Fixes #32