Skip to content

Commit 2bdf87f

Browse files
committed
as title now
1 parent e5729e1 commit 2bdf87f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

models/issues/pull.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,15 @@ func (pr *PullRequest) getReviewedByLines(ctx context.Context, writer io.Writer)
376376
}
377377

378378
// Note: This doesn't page as we only expect a very limited number of reviews
379-
reviews, err := FindLatestReviews(ctx, FindReviewOptions{
379+
opts := FindReviewOptions{
380380
Types: []ReviewType{ReviewTypeApprove},
381381
IssueID: pr.IssueID,
382382
OfficialOnly: setting.Repository.PullRequest.DefaultMergeMessageOfficialApproversOnly,
383-
Dismissed: optional.Some(false),
384-
})
383+
}
384+
if setting.Repository.PullRequest.DefaultMergeMessageOfficialApproversOnly {
385+
opts.Dismissed = optional.Some(false)
386+
}
387+
reviews, err := FindLatestReviews(ctx, opts)
385388
if err != nil {
386389
log.Error("Unable to FindReviews for PR ID %d: %v", pr.ID, err)
387390
return err

0 commit comments

Comments
 (0)