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 <6543@obermui.de>
  • Loading branch information
2 people authored and Stelios Malathouras committed Mar 28, 2022
1 parent e5b4aea commit 76779c0
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 76779c0

Please sign in to comment.