1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +00:00

Milestone issues and pull requests (#5293)

* add milestone issues and pulls page instead of redirecting issues page

* add milestone when creating issue from milestone page

* refactor to merge similiar codes as a new function issues

* remove milestone info on milestone issues list

* fix missing params
This commit is contained in:
Lunny Xiao 2018-11-29 09:46:30 +08:00 committed by GitHub
parent d5d847e5c4
commit 2dc805c0c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 573 additions and 262 deletions

View file

@ -122,6 +122,18 @@ func GetMilestoneByRepoID(repoID, id int64) (*Milestone, error) {
return getMilestoneByRepoID(x, repoID, id)
}
// GetMilestoneByID returns the milestone via id .
func GetMilestoneByID(id int64) (*Milestone, error) {
var m Milestone
has, err := x.ID(id).Get(&m)
if err != nil {
return nil, err
} else if !has {
return nil, ErrMilestoneNotExist{id, 0}
}
return &m, nil
}
// MilestoneList is a list of milestones offering additional functionality
type MilestoneList []*Milestone