Skip to content

Commit e116ad4

Browse files
Load reviewer before sending notification (#27063)
The [template](https://github.com/go-gitea/gitea/blob/main/templates/mail/issue/default.tmpl#L51) uses the Reviewer.Name property - this was not loaded. Fixes #27035
1 parent 5d755ac commit e116ad4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/mailer/notify.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ func (m *mailNotifier) PullRequestPushCommits(ctx context.Context, doer *user_mo
176176
}
177177

178178
func (m *mailNotifier) PullReviewDismiss(ctx context.Context, doer *user_model.User, review *issues_model.Review, comment *issues_model.Comment) {
179+
if err := comment.Review.LoadReviewer(ctx); err != nil {
180+
log.Error("Error in PullReviewDismiss while loading reviewer for issue[%d], review[%d] and reviewer[%d]: %v", review.Issue.ID, comment.Review.ID, comment.Review.ReviewerID, err)
181+
}
179182
if err := MailParticipantsComment(ctx, comment, activities_model.ActionPullReviewDismissed, review.Issue, nil); err != nil {
180183
log.Error("MailParticipantsComment: %v", err)
181184
}

0 commit comments

Comments
 (0)