Skip to content

Commit 696521b

Browse files
noerw6543
andauthored
fix regression from #16075 (#18260)
we don't want reviews to count towards comments, as this needs changes in other components as well (eg repo stats cron job, etc). Co-authored-by: 6543 <[email protected]>
1 parent f635d60 commit 696521b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

models/issue_comment.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,13 +835,12 @@ func updateCommentInfos(ctx context.Context, opts *CreateCommentOptions, comment
835835
}
836836
}
837837
fallthrough
838-
case CommentTypeReview:
839-
fallthrough
840838
case CommentTypeComment:
841839
if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil {
842840
return err
843841
}
844-
842+
fallthrough
843+
case CommentTypeReview:
845844
// Check attachments
846845
attachments, err := repo_model.GetAttachmentsByUUIDs(ctx, opts.Attachments)
847846
if err != nil {

0 commit comments

Comments
 (0)