Print pull dont crash if it has TeamReviewRequests (#517)
partial backport of #515 Reviewed-on: https://gitea.com/gitea/tea/pulls/517 Reviewed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
parent
6c9b2f8745
commit
c00418e74c
|
@ -99,8 +99,11 @@ func formatReviews(reviews []*gitea.PullReview) string {
|
|||
case gitea.ReviewStateApproved,
|
||||
gitea.ReviewStateRequestChanges,
|
||||
gitea.ReviewStateRequestReview:
|
||||
if r, ok := reviewByUser[review.Reviewer.ID]; !ok || review.Submitted.After(r.Submitted) {
|
||||
reviewByUser[review.Reviewer.ID] = review
|
||||
// only user reviews are supported no team review requests
|
||||
if review.Reviewer != nil {
|
||||
if r, ok := reviewByUser[review.Reviewer.ID]; !ok || review.Submitted.After(r.Submitted) {
|
||||
reviewByUser[review.Reviewer.ID] = review
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue