Fix various legacy problems (#37092)

1.  Fix #36439
2. Fix #37089
3. Fix incorrect layout of admin auth oidc page
4. Fix #35866
5. Fix #35800
6. Fix #36243
This commit is contained in:
wxiaoguang
2026-04-03 20:19:04 +08:00
committed by GitHub
parent 30c07c20e9
commit 74060bb849
18 changed files with 132 additions and 76 deletions
+7 -1
View File
@@ -451,6 +451,7 @@ func NewReleasePost(ctx *context.Context) {
return
}
form.Target = util.IfZero(form.Target, ctx.Repo.Repository.DefaultBranch)
if exist, _ := git_model.IsBranchExist(ctx, ctx.Repo.Repository.ID, form.Target); !exist {
ctx.RenderWithErrDeprecated(ctx.Tr("form.target_branch_not_exist"), tplReleaseNew, &form)
return
@@ -564,6 +565,11 @@ func EditRelease(ctx *context.Context) {
}
return
}
if rel.IsTag {
ctx.NotFound(err) // for a pure tag release, don't allow to edit it as a release
return
}
ctx.Data["ID"] = rel.ID
ctx.Data["tag_name"] = rel.TagName
ctx.Data["tag_target"] = util.IfZero(rel.Target, ctx.Repo.Repository.DefaultBranch)
@@ -613,7 +619,7 @@ func EditReleasePost(ctx *context.Context) {
return
}
if rel.IsTag {
ctx.NotFound(err)
ctx.NotFound(err) // for a pure tag release, don't allow to edit it as a release
return
}
ctx.Data["tag_name"] = rel.TagName