1
0
mirror of https://github.com/go-gitea/gitea synced 2025-01-07 13:26:01 +01:00

fix regression from ()

we don't want reviews to count towards comments, as this needs changes
in other components as well (eg repo stats cron job, etc).
This commit is contained in:
Norwin 2022-01-13 17:13:08 +01:00 committed by GitHub
parent 37abfcaf8a
commit e4120bbc89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {