fix: load reviewer for pull review dismiss action notifier
This was implicitly loaded during the mail notifications notifier. If you disable mail notifications on Forgejo then this will result in the reviewer not being loaded and NPE.
This commit is contained in:
@@ -308,6 +308,10 @@ func (*actionNotifier) AutoMergePullRequest(ctx context.Context, doer *user_mode
|
||||
}
|
||||
|
||||
func (*actionNotifier) PullReviewDismiss(ctx context.Context, doer *user_model.User, review *issues_model.Review, comment *issues_model.Comment) {
|
||||
if err := review.LoadReviewer(ctx); err != nil {
|
||||
log.Error("LoadReviewer '%d/%d': %v", review.ID, review.ReviewerID, err)
|
||||
return
|
||||
}
|
||||
reviewerName := review.Reviewer.Name
|
||||
if len(review.OriginalAuthor) > 0 {
|
||||
reviewerName = review.OriginalAuthor
|
||||
|
||||
Reference in New Issue
Block a user