1
1
mirror of https://github.com/go-gitea/gitea synced 2025-09-28 03:28:13 +00:00

Add builds UI

This commit is contained in:
Lunny Xiao
2022-05-03 16:03:24 +08:00
committed by Jason Song
parent 7732392a96
commit 5a479bb034
23 changed files with 599 additions and 50 deletions

View File

@@ -142,6 +142,9 @@ type Repository struct {
NumProjects int `xorm:"NOT NULL DEFAULT 0"`
NumClosedProjects int `xorm:"NOT NULL DEFAULT 0"`
NumOpenProjects int `xorm:"-"`
NumBuilds int `xorm:"NOT NULL DEFAULT 0"`
NumClosedBuilds int `xorm:"NOT NULL DEFAULT 0"`
NumOpenBuilds int `xorm:"-"`
IsPrivate bool `xorm:"INDEX"`
IsEmpty bool `xorm:"INDEX"`
@@ -234,6 +237,7 @@ func (repo *Repository) AfterLoad() {
repo.NumOpenPulls = repo.NumPulls - repo.NumClosedPulls
repo.NumOpenMilestones = repo.NumMilestones - repo.NumClosedMilestones
repo.NumOpenProjects = repo.NumProjects - repo.NumClosedProjects
repo.NumOpenBuilds = repo.NumBuilds - repo.NumClosedBuilds
}
// LoadAttributes loads attributes of the repository.