From b698b256f1f687ae357d07b36e66931247bab22f Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Mon, 16 Dec 2024 15:34:41 +0100 Subject: [PATCH] fix: Ignore self review request notification A notification would be trigger if a user request itself as review of a PR. --- services/issue/assignee.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/issue/assignee.go b/services/issue/assignee.go index 9c2ef74bb0..3d6d0b881a 100644 --- a/services/issue/assignee.go +++ b/services/issue/assignee.go @@ -72,7 +72,8 @@ func ReviewRequest(ctx context.Context, issue *issues_model.Issue, doer, reviewe return nil, err } - if comment != nil { + // don't notify if the user is requesting itself as reviewer + if comment != nil && doer.ID != reviewer.ID { notify_service.PullRequestReviewRequest(ctx, doer, issue, reviewer, isAdd, comment) }