From c75ed0ee162e2f7c6d59c17edd94d820aa0dc98e Mon Sep 17 00:00:00 2001 From: Norwin Date: Wed, 12 Jan 2022 23:13:21 +0100 Subject: [PATCH] fix regression from #16075 we don't want reviews to count towards comments, as this needs changes in other components as well (eg repo stats cron job, etc). --- models/issue_comment.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/models/issue_comment.go b/models/issue_comment.go index 4c5b77ff8e556..cd24b655d1aed 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -762,13 +762,12 @@ func updateCommentInfos(e *xorm.Session, opts *CreateCommentOptions, comment *Co } } fallthrough - case CommentTypeReview: - fallthrough case CommentTypeComment: if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil { return err } - + fallthrough + case CommentTypeReview: // Check attachments attachments, err := getAttachmentsByUUIDs(e, opts.Attachments) if err != nil {