File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,9 @@ func (issues IssueList) LoadAssignees(ctx context.Context) error {
312
312
313
313
for _ , issue := range issues {
314
314
issue .Assignees = assignees [issue .ID ]
315
+ if len (issue .Assignees ) > 0 {
316
+ issue .Assignee = issue .Assignees [0 ]
317
+ }
315
318
issue .isAssigneeLoaded = true
316
319
}
317
320
return nil
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ func (prs PullRequestList) LoadRepositories(ctx context.Context) error {
174
174
if err := db .GetEngine (ctx ).
175
175
In ("id" , repoIDs ).
176
176
Find (& reposMap ); err != nil {
177
- return fmt .Errorf ("find issues : %w" , err )
177
+ return fmt .Errorf ("find repos : %w" , err )
178
178
}
179
179
for _ , pr := range prs {
180
180
if pr .BaseRepo == nil {
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ func ListPullRequests(ctx *context.APIContext) {
118
118
apiPrs := make ([]* api.PullRequest , len (prs ))
119
119
// NOTE: load repository first, so that issue.Repo will be filled with pr.BaseRepo
120
120
if err := prs .LoadRepositories (ctx ); err != nil {
121
- ctx .Error (http .StatusInternalServerError , "LoadAttributes " , err )
121
+ ctx .Error (http .StatusInternalServerError , "LoadRepositories " , err )
122
122
return
123
123
}
124
124
issueList , err := prs .LoadIssues (ctx )
You can’t perform that action at this time.
0 commit comments