From a516a7ba0f28f8bb5348beecaef38c99d64861cd Mon Sep 17 00:00:00 2001
From: John Olheiser <42128690+jolheiser@users.noreply.github.com>
Date: Fri, 10 Jan 2020 21:58:03 -0600
Subject: [PATCH] Load milestone in API PR list (#9671) (#9700)

---
 models/issue.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/models/issue.go b/models/issue.go
index 3986aeee15..8218614edd 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())