diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go index e446660c4..4b07d4b04 100644 --- a/routers/api/v1/repo/tag.go +++ b/routers/api/v1/repo/tag.go @@ -301,7 +301,9 @@ func BranchTagCount(ctx *context.APIContext) { // "200": // "$ref": "#/responses/RepoBranchAndTagCount" - tagsCount, err := ctx.Repo.GitRepo.GetTagCount() // tags info + tagsCount, err := models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ + IncludeTags: true, + }) if err != nil { ctx.Error(http.StatusInternalServerError, "GetTagCount", err) return