mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
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:
parent
69a85a673f
commit
97844fa8a8
1 changed files with 4 additions and 0 deletions
|
|
@ -300,6 +300,10 @@ func (*actionNotifier) AutoMergePullRequest(ctx context.Context, doer *user_mode
|
|||
}
|
||||
|
||||
func (*actionNotifier) NotifyPullRevieweDismiss(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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue