99 asymkey_model "code.gitea.io/gitea/models/asymkey"
1010 "code.gitea.io/gitea/models/auth"
1111 "code.gitea.io/gitea/models/db"
12+ git_model "code.gitea.io/gitea/models/git"
1213 issues_model "code.gitea.io/gitea/models/issues"
1314 "code.gitea.io/gitea/models/organization"
1415 access_model "code.gitea.io/gitea/models/perm/access"
@@ -29,7 +30,8 @@ type Statistic struct {
2930 Mirror , Release , AuthSource , Webhook ,
3031 Milestone , Label , HookTask ,
3132 Team , UpdateTask , Project ,
32- ProjectBoard , Attachment int64
33+ ProjectBoard , Attachment ,
34+ Branches , Tags , CommitStatus int64
3335 IssueByLabel []IssueByLabelCount
3436 IssueByRepository []IssueByRepositoryCount
3537 }
@@ -58,6 +60,9 @@ func GetStatistic(ctx context.Context) (stats Statistic) {
5860 stats .Counter .Watch , _ = e .Count (new (repo_model.Watch ))
5961 stats .Counter .Star , _ = e .Count (new (repo_model.Star ))
6062 stats .Counter .Access , _ = e .Count (new (access_model.Access ))
63+ stats .Counter .Branches , _ = e .Count (new (git_model.Branch ))
64+ stats .Counter .Tags , _ = e .Where ("is_draft=?" , false ).Count (new (repo_model.Release ))
65+ stats .Counter .CommitStatus , _ = e .Count (new (git_model.CommitStatus ))
6166
6267 type IssueCount struct {
6368 Count int64
0 commit comments