diff options
author | Unknwon <u@gogs.io> | 2015-09-02 16:18:09 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-02 16:18:09 -0400 |
commit | 83dc2468f574e9cf83515e54268bdb4c03f6d98c (patch) | |
tree | 03499c31d850c1c0e4cb063b9cc70f9c1d2a063b /models/repo.go | |
parent | 842770d7fbc72789d6df885da7ec5a2d4070f25f (diff) | |
download | gitea-83dc2468f574e9cf83515e54268bdb4c03f6d98c.tar.gz gitea-83dc2468f574e9cf83515e54268bdb4c03f6d98c.zip |
finish initial version of pull request
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index c640db5d49..fc2ab8eee2 100644 --- a/models/repo.go +++ b/models/repo.go @@ -167,6 +167,12 @@ type Repository struct { func (repo *Repository) AfterSet(colName string, _ xorm.Cell) { switch colName { + case "num_closed_issues": + repo.NumOpenIssues = repo.NumIssues - repo.NumClosedIssues + case "num_closed_pulls": + repo.NumOpenPulls = repo.NumPulls - repo.NumClosedPulls + case "num_closed_milestones": + repo.NumOpenMilestones = repo.NumMilestones - repo.NumClosedMilestones case "updated": repo.Updated = regulateTimeZone(repo.Updated) } @@ -221,8 +227,8 @@ func (repo *Repository) GetMilestoneByID(milestoneID int64) (*Milestone, error) } // IssueStats returns number of open and closed repository issues by given filter mode. -func (repo *Repository) IssueStats(uid int64, filterMode int) (int64, int64) { - return GetRepoIssueStats(repo.ID, uid, filterMode) +func (repo *Repository) IssueStats(uid int64, filterMode int, isPull bool) (int64, int64) { + return GetRepoIssueStats(repo.ID, uid, filterMode, isPull) } func (repo *Repository) GetMirror() (err error) { |