Remove util.URLJoin and replace all callers with direct path concatenation (#36867)
`util.URLJoin` was deprecated with unclear semantics (path normalization via `url.Parse`/`ResolveReference` that surprised callers). This removes it entirely and replaces all usages with straightforward `"/"` string concatenation. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
rpm_module "code.gitea.io/gitea/modules/packages/rpm"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/ProtonMail/go-crypto/openpgp"
|
||||
@@ -99,7 +98,7 @@ gpgcheck=1
|
||||
gpgkey=%sapi/packages/%s/rpm/repository.key`,
|
||||
strings.Join(append([]string{user.LowerName}, groupParts...), "-"),
|
||||
strings.Join(append([]string{user.Name, setting.AppName}, groupParts...), " - "),
|
||||
util.URLJoin(setting.AppURL, groupURL),
|
||||
strings.TrimSuffix(setting.AppURL, "/")+groupURL,
|
||||
setting.AppURL,
|
||||
user.Name,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user