1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +00:00

Tag list should include draft releases with existing tags (#21263)

Before, a tag for a draft release disappeared in the tag list, fix #21262.

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Jason Song
2022-10-03 20:05:53 +08:00
committed by GitHub
parent af849ac009
commit a08b484549
4 changed files with 24 additions and 8 deletions

View File

@ -524,7 +524,9 @@ func RepoAssignment(ctx *Context) (cancel context.CancelFunc) {
}
ctx.Data["NumTags"], err = repo_model.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, repo_model.FindReleasesOptions{
IncludeTags: true,
IncludeDrafts: true,
IncludeTags: true,
HasSha1: util.OptionalBoolTrue, // only draft releases which are created with existing tags
})
if err != nil {
ctx.ServerError("GetReleaseCountByRepoID", err)