"Main" review comments not included into PR comment count #6811

Open
opened 2025-11-02 07:07:14 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @MGChecker on GitHub (Feb 4, 2021).

Description

If you review a pull request, your comment is not included into the total coment count displayed on the PR overview. This is kind of expected, since they seem not to be considered as comments internally.

Originally created by @MGChecker on GitHub (Feb 4, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> - Gitea version (or commit ref): 1.13.2, master - Git version: 2.20.1 - Operating system: Debian 10 (Buster) - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) https://try.gitea.io/MGChecker/DokuForge2/pulls - [ ] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description If you review a pull request, your comment is not included into the total coment count displayed on the PR overview. This is kind of expected, since they seem not to be considered as comments internally.
GiteaMirror added the topic/prtype/proposalmodifies/api labels 2025-11-02 07:07:14 -06:00
Author
Owner

@MGChecker commented on GitHub (Feb 4, 2021):

Probably related to #13394.

@MGChecker commented on GitHub (Feb 4, 2021): Probably related to #13394.
Author
Owner

@noerw commented on GitHub (Jan 13, 2022):

Quoting myself from https://github.com/go-gitea/gitea/issues/16901#issuecomment-941318050:

This count is also returned in the API, and is likely to be used as a indication how many comments to fetch for an issue / PR. Problem is, the comments API does not return reviews as comments, leading to bad state in API clients.
So either that API needs to be changed as well to return review comments as well (seems also intuitive), or we should just revert the change from #16075

and https://github.com/go-gitea/gitea/issues/16901#issuecomment-942083356:

github does the following:

  • in the UI, they count any comment (including code comments) that has a body.
  • the /pulls/{index}/comments API endpoint only returns non-review comments
  • the /pulls/{index} endpoint returns two separate counters comments + review_comments

this feels like a reasonable solution, that could even be backported

So the question remains whether we want to prioritize having an easy to use API, or if we want GitHub-API-compatibility 🗡️

@noerw commented on GitHub (Jan 13, 2022): Quoting myself from https://github.com/go-gitea/gitea/issues/16901#issuecomment-941318050: > This count is also returned in the API, and is likely to be used as a indication how many comments to fetch for an issue / PR. Problem is, the comments API does not return reviews as comments, leading to bad state in API clients. > So either that API needs to be changed as well to return review comments as well (seems also intuitive), or we should just revert the change from #16075 and https://github.com/go-gitea/gitea/issues/16901#issuecomment-942083356: > github does the following: > - in the UI, they count any comment (including code comments) that has a body. > - the `/pulls/{index}/comments` API endpoint only returns non-review comments > - the `/pulls/{index}` endpoint returns two separate counters `comments` + `review_comments` > > this feels like a reasonable solution, that could even be backported So the question remains whether we want to prioritize having an easy to use API, or if we want GitHub-API-compatibility :dagger:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6811