File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func (comments CommentList) getLabelIDs() []int64 {
56
56
return ids .Values ()
57
57
}
58
58
59
- func (comments CommentList ) loadLabels (ctx context.Context ) error { //nolint
59
+ func (comments CommentList ) loadLabels (ctx context.Context ) error {
60
60
if len (comments ) == 0 {
61
61
return nil
62
62
}
@@ -415,7 +415,7 @@ func (comments CommentList) getReviewIDs() []int64 {
415
415
return ids .Values ()
416
416
}
417
417
418
- func (comments CommentList ) loadReviews (ctx context.Context ) error { //nolint
418
+ func (comments CommentList ) loadReviews (ctx context.Context ) error {
419
419
if len (comments ) == 0 {
420
420
return nil
421
421
}
@@ -453,6 +453,14 @@ func (comments CommentList) loadReviews(ctx context.Context) error { //nolint
453
453
454
454
for _ , comment := range comments {
455
455
comment .Review = reviews [comment .ReviewID ]
456
+
457
+ // If the comment dismisses a review, we need to load the reviewer to show whose review has been dismissed.
458
+ // Otherwise, the reviewer is the poster of the comment, so we don't need to load it.
459
+ if comment .Type == CommentTypeDismissReview {
460
+ if err := comment .Review .LoadReviewer (ctx ); err != nil {
461
+ return err
462
+ }
463
+ }
456
464
}
457
465
return nil
458
466
}
You can’t perform that action at this time.
0 commit comments