mirror of
https://github.com/go-gitea/gitea
synced 2025-08-04 00:28:36 +00:00
Backport #33172 by wxiaoguang Fix #33164 and add more tests Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -305,8 +305,7 @@ func RepoRefForAPI(next http.Handler) http.Handler {
|
||||
return
|
||||
}
|
||||
|
||||
// NOTICE: the "ref" here for internal usage only (e.g. woodpecker)
|
||||
refName, _ := getRefNameLegacy(ctx.Base, ctx.Repo, ctx.FormTrim("ref"))
|
||||
refName, _ := getRefNameLegacy(ctx.Base, ctx.Repo, ctx.PathParam("*"), ctx.FormTrim("ref"))
|
||||
var err error
|
||||
|
||||
if ctx.Repo.GitRepo.IsBranchExist(refName) {
|
||||
|
Reference in New Issue
Block a user