1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00
gitea/services
Jason Song 74874d065f
Fix issue/PR numbers (#22037)
When deleting a closed issue, we should update both `NumIssues`and
`NumClosedIssues`, or `NumOpenIssues`(`= NumIssues -NumClosedIssues`)
will be wrong. It's the same for pull requests.

Releated to #21557.

Alse fixed two harmless problems:

- The SQL to check issue/PR total numbers is wrong, that means it will
update the numbers even if they are correct.
- Replace legacy `num_issues = num_issues + 1` operations with
`UpdateRepoIssueNumbers`.
2022-12-06 15:53:09 +08:00
..
agit refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
asymkey Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
attachment Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
auth refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
automerge refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
comments Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
context Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
cron Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
externalaccount Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
forms Update gitea-vet to check FSFE REUSE (#22004) 2022-12-02 22:14:57 +08:00
gitdiff Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue Fix issue/PR numbers (#22037) 2022-12-06 15:53:09 +08:00
lfs refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
mailer refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
markup Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
migrations refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
mirror Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
org Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
packages Update gitea-vet to check FSFE REUSE (#22004) 2022-12-02 22:14:57 +08:00
pull refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
release refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repository refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
task Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
webhook Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
wiki Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00