Load milestone in API PR list (#9671) (#9700)

This commit is contained in:
John Olheiser 2020-01-10 21:58:03 -06:00 committed by techknowlogick
parent 11bce6fd3d
commit a516a7ba0f
1 changed files with 2 additions and 1 deletions

View File

@ -403,11 +403,12 @@ func (issue *Issue) apiFormat(e Engine) *api.Issue {
apiIssue.Closed = issue.ClosedUnix.AsTimePtr()
}
issue.loadMilestone(e)
if issue.Milestone != nil {
apiIssue.Milestone = issue.Milestone.APIFormat()
}
issue.loadAssignees(e)
issue.loadAssignees(e)
if len(issue.Assignees) > 0 {
for _, assignee := range issue.Assignees {
apiIssue.Assignees = append(apiIssue.Assignees, assignee.APIFormat())