fix(git): remove .git suffix for links (#1716)

This commit is contained in:
Richard Gomez authored and GitHub committed 2025-01-21 19:17:26 -06:00
1 parent a43dc0d3d0
commit d2ffffecbd
1 file changed
+2 -3
+2 -3
View File
@@ -146,10 +146,9 @@ func getRemoteUrl(source string) (*url.URL, error) {
remoteUrl := string(bytes.TrimSpace(stdout))
if matches := sshUrlpat.FindStringSubmatch(remoteUrl); matches != nil {
host := matches[1]
repo := strings.TrimSuffix(matches[2], ".git")
remoteUrl = fmt.Sprintf("https://%s/%s", host, repo)
remoteUrl = fmt.Sprintf("https://%s/%s", matches[1], matches[2])
}
remoteUrl = strings.TrimSuffix(remoteUrl, ".git")
parsedUrl, err := url.Parse(remoteUrl)
if err != nil {