Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent PR comment counts #18260

Merged
merged 2 commits into from Jan 13, 2022
Merged

Fix inconsistent PR comment counts #18260

merged 2 commits into from Jan 13, 2022

Conversation

noerw
Copy link
Member

@noerw noerw commented Jan 13, 2022

This makes the comment count on PRs consistent with repostats cronjob behaviour again: ie. don't try to count review comments towards issue comment count (fixing a regression from #16075).
This is also a bugfix for API clients, that rely on that count to fetch issue comments (but that API does not include review comments, resulting in bad client state).

fixes #16901
In a later PR we can aim at counting PR-reviews & code comments towards the the PR comment count similar to github.

we don't want reviews to count towards comments, as this needs changes
in other components as well (eg repo stats cron job, etc).
@noerw noerw added this to the 1.16.0 milestone Jan 13, 2022
@noerw noerw changed the title fix regression from #16075 Fix inconsistent PR comment counts Jan 13, 2022
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jan 13, 2022
@6543
Copy link
Member

6543 commented Jan 13, 2022

add a doctor task to fix wrong records?

@noerw
Copy link
Member Author

noerw commented Jan 13, 2022

@6543 cron.check_repo_stats will fix the comment counts anyway, per default config after 24h..

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 13, 2022
@noerw noerw added the backport/done All backports for this PR have been created label Jan 13, 2022
@lunny lunny merged commit 696521b into go-gitea:main Jan 13, 2022
@6543 6543 deleted the fix-16901 branch January 13, 2022 17:31
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jan 14, 2022
* 'main' of https://github.com/go-gitea/gitea:
  [skip ci] Updated translations via Crowdin
  Improve the comment for 2FA filter in admin panel (go-gitea#18017)
  fix regression from go-gitea#16075 (go-gitea#18260)
  Prevent underline hover on cards (go-gitea#18259)
  Fix release link broken (go-gitea#18252)
  migrations: a deadline at January 1st, 1970 is valid (go-gitea#18237)
@richmahn richmahn mentioned this pull request Jan 14, 2022
zeripath pushed a commit that referenced this pull request Jan 14, 2022
[1.15.10](https://github.com/go-gitea/gitea/releases/tag/v1.15.10) - 2022-01-14

* BUGFIXES
  * Fix inconsistent PR comment counts (#18260) (#18261)
  * Fix release link broken (#18252) (#18253)
  * Fix update user from site administration page bug (#18250) (#18251)
  * Set HeadCommit when creating tags (#18116) (#18173)
  * Use correct translation key for error messages due to max repo limits (#18135 & #18153) (#18152)
  * Fix purple color in suggested label colors (#18241) (#18242)
* SECURITY
  * Bump mermaid from 8.10.1 to 8.13.8 (#18198) (#18206)
zeripath pushed a commit to zeripath/gitea that referenced this pull request Jan 14, 2022
[1.15.10](https://github.com/go-gitea/gitea/releases/tag/v1.15.10) - 2022-01-14

* BUGFIXES
  * Fix inconsistent PR comment counts (go-gitea#18260) (go-gitea#18261)
  * Fix release link broken (go-gitea#18252) (go-gitea#18253)
  * Fix update user from site administration page bug (go-gitea#18250) (go-gitea#18251)
  * Set HeadCommit when creating tags (go-gitea#18116) (go-gitea#18173)
  * Use correct translation key for error messages due to max repo limits (go-gitea#18135 & go-gitea#18153) (go-gitea#18152)
  * Fix purple color in suggested label colors (go-gitea#18241) (go-gitea#18242)
* SECURITY
  * Bump mermaid from 8.10.1 to 8.13.8 (go-gitea#18198) (go-gitea#18206)
techknowlogick pushed a commit that referenced this pull request Jan 14, 2022
* Changelog for 1.15.10 (#18274)

[1.15.10](https://github.com/go-gitea/gitea/releases/tag/v1.15.10) - 2022-01-14

* BUGFIXES
  * Fix inconsistent PR comment counts (#18260) (#18261)
  * Fix release link broken (#18252) (#18253)
  * Fix update user from site administration page bug (#18250) (#18251)
  * Set HeadCommit when creating tags (#18116) (#18173)
  * Use correct translation key for error messages due to max repo limits (#18135 & #18153) (#18152)
  * Fix purple color in suggested label colors (#18241) (#18242)
* SECURITY
  * Bump mermaid from 8.10.1 to 8.13.8 (#18198) (#18206)

* update docs/config.yaml

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Richard Mahn <richmahn@users.noreply.github.com>
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
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>
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* Changelog for 1.15.10 (go-gitea#18274)

[1.15.10](https://github.com/go-gitea/gitea/releases/tag/v1.15.10) - 2022-01-14

* BUGFIXES
  * Fix inconsistent PR comment counts (go-gitea#18260) (go-gitea#18261)
  * Fix release link broken (go-gitea#18252) (go-gitea#18253)
  * Fix update user from site administration page bug (go-gitea#18250) (go-gitea#18251)
  * Set HeadCommit when creating tags (go-gitea#18116) (go-gitea#18173)
  * Use correct translation key for error messages due to max repo limits (go-gitea#18135 & go-gitea#18153) (go-gitea#18152)
  * Fix purple color in suggested label colors (go-gitea#18241) (go-gitea#18242)
* SECURITY
  * Bump mermaid from 8.10.1 to 8.13.8 (go-gitea#18198) (go-gitea#18206)

* update docs/config.yaml

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Richard Mahn <richmahn@users.noreply.github.com>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent wrong comment count on PRs
4 participants