0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-19 00:11:24 +01:00
gitea/models
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
..
activities refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
admin Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
asymkey refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
auth Use random bytes to generate access token (#21959) 2022-11-28 23:37:42 +08:00
avatars Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
db Fix generate index failure possibility on postgres (#21998) 2022-12-02 11:15:36 +08:00
fixtures Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
foreignreference Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
git refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
issues Fix issue/PR numbers (#22037) 2022-12-06 15:53:09 +08:00
migrations Update gitea-vet to check FSFE REUSE (#22004) 2022-12-02 22:14:57 +08:00
organization refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
packages refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
perm refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
project refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
pull refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repo refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
system Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
unit Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
unittest Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
webhook Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
error.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fixture_generation.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
fixture_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
migrate.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
migrate_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
org.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
org_team.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
org_team_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
org_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo.go Fix issue/PR numbers (#22037) 2022-12-06 15:53:09 +08:00
repo_collaboration.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repo_collaboration_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_transfer.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
repo_transfer_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
user.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00