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 <6543@obermui.de>
This commit is contained in:
Norwin 2022-01-13 17:50:43 +01:00 committed by GitHub
parent f635d60344
commit 696521b33b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -835,13 +835,12 @@ func updateCommentInfos(ctx context.Context, opts *CreateCommentOptions, comment
} }
} }
fallthrough fallthrough
case CommentTypeReview:
fallthrough
case CommentTypeComment: case CommentTypeComment:
if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil { if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil {
return err return err
} }
fallthrough
case CommentTypeReview:
// Check attachments // Check attachments
attachments, err := repo_model.GetAttachmentsByUUIDs(ctx, opts.Attachments) attachments, err := repo_model.GetAttachmentsByUUIDs(ctx, opts.Attachments)
if err != nil { if err != nil {