diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2020-01-10 15:17:56 -0600 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2020-01-10 16:17:56 -0500 |
commit | 480ef9d410a5c94c0ce4d16b922be3b1114d620c (patch) | |
tree | c321a33c58ca3340e1fb27d9a04c4f8a53993e84 | |
parent | e90e435f045a780dd38bf5de0bd24d606531750b (diff) | |
download | gitea-480ef9d410a5c94c0ce4d16b922be3b1114d620c.tar.gz gitea-480ef9d410a5c94c0ce4d16b922be3b1114d620c.zip |
Load milestone in API PR list (#9671)
* Load milestone for Issue API format
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Move further down
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <matti@mdranta.net>
-rw-r--r-- | models/issue.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index aeeb70d27b..25765292ae 100644 --- a/models/issue.go +++ b/models/issue.go @@ -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()) |