Skip to content

Commit

Permalink
Load attachments for code comments (#30124)
Browse files Browse the repository at this point in the history
Fix #30103

ps: comments has `LoadAttributes`, but maybe considering performance
problem, we don't call it.

(cherry picked from commit ce3c3512265df3b4940672be40065c4fb415ef95)
  • Loading branch information
yp05327 authored and earl-warren committed Mar 30, 2024
1 parent 3a7d05f commit fa87a57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/issues/comment_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ func findCodeComments(ctx context.Context, opts FindCommentsOptions, issue *Issu
return nil, err
}

if err := comments.LoadAttachments(ctx); err != nil {
return nil, err
}

// Find all reviews by ReviewID
reviews := make(map[int64]*Review)
ids := make([]int64, 0, len(comments))
Expand Down

0 comments on commit fa87a57

Please sign in to comment.