mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Working on issue and install page
This commit is contained in:
@@ -136,6 +136,12 @@ func GetIssues(userId, repoId, posterId, milestoneId int64, page int, isClosed,
|
||||
return issues, err
|
||||
}
|
||||
|
||||
// GetUserIssueCount returns the number of issues that were created by given user in repository.
|
||||
func GetUserIssueCount(userId, repoId int64) int64 {
|
||||
count, _ := orm.Where("poster_id=?", userId).And("repo_id=?", repoId).Count(new(Issue))
|
||||
return count
|
||||
}
|
||||
|
||||
// UpdateIssue updates information of issue.
|
||||
func UpdateIssue(issue *Issue) error {
|
||||
_, err := orm.Id(issue.Id).AllCols().Update(issue)
|
||||
|
@@ -84,6 +84,7 @@ type Repository struct {
|
||||
NumForks int
|
||||
NumIssues int
|
||||
NumClosedIssues int
|
||||
NumOpenIssues int `xorm:"-"`
|
||||
IsPrivate bool
|
||||
IsBare bool
|
||||
Created time.Time `xorm:"created"`
|
||||
|
Reference in New Issue
Block a user