githaven-fork/models/issues
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
..
assignees_test.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
assignees.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
comment_list.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
comment_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
comment.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
content_history_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
content_history.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
dependency_test.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
dependency.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_index.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_list_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_list.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_lock.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_project.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_user_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_user.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_watch_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_watch.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_xref_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_xref.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
issue.go Fix issue/PR numbers (#22037) 2022-12-06 15:53:09 +08:00
label_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
label.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
milestone_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
milestone.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
pull_list.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
pull_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
pull.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
reaction_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
reaction.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
review_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
review.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
stopwatch_test.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
stopwatch.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
tracked_time_test.go refactor some functions to support ctx as first parameter (#21878) 2022-12-03 10:48:26 +08:00
tracked_time.go Use GhostUser if needed for TrackedTimes (#22021) 2022-12-04 17:48:18 +00:00