From 13090769db45ab11b1363d540aba892a5f36460c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 23 Nov 2025 17:03:55 -0500 Subject: [PATCH] fix repo url parsing --- modules/git/url/url.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/git/url/url.go b/modules/git/url/url.go index d137de8f5b..69259b9e70 100644 --- a/modules/git/url/url.go +++ b/modules/git/url/url.go @@ -132,13 +132,14 @@ func ParseRepositoryURL(ctx context.Context, repoURL string) (*RepositoryURL, er if len(fields) >= 3 { ret.GroupID, pathErr = strconv.ParseInt(fields[1], 10, 64) if pathErr != nil { - return pathErr + ret.RepoName = strings.TrimSuffix(fields[1], ".git") + ret.RemainingPath = "/" + fields[2] + return nil } ret.RepoName = strings.TrimSuffix(fields[2], ".git") - ret.RemainingPath = "/" + fields[3] - } else { - ret.RepoName = strings.TrimSuffix(fields[1], ".git") - ret.RemainingPath = "/" + fields[2] + if len(fields) >= 4 { + ret.RemainingPath = "/" + fields[3] + } } } return nil