Fix the logic of finding the latest pull review commit ID (#32139)

Fix #31423
This commit is contained in:
Zettat123 2024-10-01 09:58:55 +08:00 committed by GitHub
parent 13283873e9
commit f4b8f6fc40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 88 additions and 11 deletions

View file

@ -414,7 +414,7 @@ func (pr *PullRequest) getReviewedByLines(ctx context.Context, writer io.Writer)
// Note: This doesn't page as we only expect a very limited number of reviews
reviews, err := FindLatestReviews(ctx, FindReviewOptions{
Type: ReviewTypeApprove,
Types: []ReviewType{ReviewTypeApprove},
IssueID: pr.IssueID,
OfficialOnly: setting.Repository.PullRequest.DefaultMergeMessageOfficialApproversOnly,
})