From bce6b5b7f3f21922d76ecfa806e6bf0a1b909cea 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 9a6f4247b0827..03a2a630de859 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -835,13 +835,12 @@ func updateCommentInfos(ctx context.Context, opts *CreateCommentOptions, comment } } 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 := repo_model.GetAttachmentsByUUIDs(ctx, opts.Attachments) if err != nil {