1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

[Backport] Fix release counter on API repository info (#10968) (#10996)

* Fix release counter on API repository info (#10968)

* correct Pull Count to v1.11 Fixtures
This commit is contained in:
6543
2020-04-07 00:13:12 +02:00
committed by GitHub
parent c34ad62eea
commit 0c4be64345
4 changed files with 25 additions and 7 deletions

View File

@@ -396,7 +396,7 @@ func RepoAssignment() macaron.Handler {
ctx.Data["RepoExternalIssuesLink"] = unit.ExternalTrackerConfig().ExternalTrackerURL
}
count, err := models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{
ctx.Data["NumReleases"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{
IncludeDrafts: false,
IncludeTags: true,
})
@@ -404,7 +404,6 @@ func RepoAssignment() macaron.Handler {
ctx.ServerError("GetReleaseCountByRepoID", err)
return
}
ctx.Repo.Repository.NumReleases = int(count)
ctx.Data["Title"] = owner.Name + "/" + repo.Name
ctx.Data["Repository"] = repo