diff options
author | yp05327 <576951401@qq.com> | 2023-07-14 10:47:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-14 10:47:17 +0200 |
commit | dc679fc9faf3c661d23849f3cc1c3e02f995f74f (patch) | |
tree | f234672b4f8c12a638d279568417ba7ffa265d49 /routers | |
parent | Add Github related extensions in devcontainer (#25800) (diff) | |
download | forgejo-dc679fc9faf3c661d23849f3cc1c3e02f995f74f.tar.xz forgejo-dc679fc9faf3c661d23849f3cc1c3e02f995f74f.zip |
Fix incorrect release count (#25879)
Release count is not correct:
https://try.gitea.io/yp05327/testrepo/tags
![image](https://github.com/go-gitea/gitea/assets/18380374/07f97c62-d450-4ccb-b3f2-3e0af9d9fc52)
https://try.gitea.io/yp05327/testrepo/releases
![image](https://github.com/go-gitea/gitea/assets/18380374/6f1d55a4-bb68-445d-84b9-90552a40f403)
https://try.gitea.io/yp05327/testrepo/releases/tag/testtag
![image](https://github.com/go-gitea/gitea/assets/18380374/09ab5d51-52b6-4621-a571-3100198eb260)
We already have correct release count, no need to calculate it again.
https://github.com/go-gitea/gitea/blob/c5e187c389b35b9e080a3187b93a775a3c81e585/modules/context/repo.go#L547
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/release.go | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go index c9f12a0f18..1a0303f1f2 100644 --- a/routers/web/repo/release.go +++ b/routers/web/repo/release.go @@ -196,7 +196,6 @@ func releasesOrTags(ctx *context.Context, isTagList bool) { } ctx.Data["Releases"] = releases - ctx.Data["ReleasesNum"] = len(releases) pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) pager.SetDefaultParams(ctx) |