]> source.dussan.org Git - gitea.git/commitdiff
Don't send notification on pending reviews (#8943)
authorguillep2k <18600385+guillep2k@users.noreply.github.com>
Wed, 13 Nov 2019 18:36:04 +0000 (15:36 -0300)
committerzeripath <art27@cantab.net>
Wed, 13 Nov 2019 18:36:04 +0000 (18:36 +0000)
services/pull/review.go

index e4aae3c0d5885b390d285d871b2686ccc62ea7e3..294297f956dacc3a6b97a0756a0d94df052d43d6 100644 (file)
@@ -17,7 +17,9 @@ func CreateReview(opts models.CreateReviewOptions) (*models.Review, error) {
                return nil, err
        }
 
-       notification.NotifyPullRequestReview(review.Issue.PullRequest, review, nil)
+       if opts.Type != models.ReviewTypePending {
+               notification.NotifyPullRequestReview(review.Issue.PullRequest, review, nil)
+       }
 
        return review, nil
 }