Skip to content

Commit

Permalink
fix regression from go-gitea#16075 (go-gitea#18260)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
noerw and 6543 authored Jan 13, 2022
1 parent f635d60 commit 696521b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions models/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 696521b

Please sign in to comment.