mirror of
https://gitea.com/gitea/tea.git
synced 2024-11-23 19:11:38 +01:00
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,
|
case gitea.ReviewStateApproved,
|
||||||
gitea.ReviewStateRequestChanges,
|
gitea.ReviewStateRequestChanges,
|
||||||
gitea.ReviewStateRequestReview:
|
gitea.ReviewStateRequestReview:
|
||||||
if r, ok := reviewByUser[review.Reviewer.ID]; !ok || review.Submitted.After(r.Submitted) {
|
// only user reviews are supported no team review requests
|
||||||
reviewByUser[review.Reviewer.ID] = review
|
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
Block a user