Skip to content

Commit

Permalink
fix regression from #16075 (#18261)
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).
  • Loading branch information
noerw authored Jan 13, 2022
1 parent 37abfca commit e4120bb
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 @@ -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 {
Expand Down

0 comments on commit e4120bb

Please sign in to comment.