You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/services/migrations
Aravinth Manivannan 076cead40d
Fix CheckRepoStats and reuse it during migration (#18264)
The CheckRepoStats function missed the following counters:

- label num_closed_issues & num_closed_pulls
- milestone num_closed_issues & num_closed_pulls

The update SQL statements for updating the repository
num_closed_issues & num_closed_pulls fields were repeated in three
functions (repo.CheckRepoStats, migrate.insertIssues and
models.Issue.updateClosedNum) and were moved to a single helper.

The UpdateRepoStats is implemented and called in the Finish migration method so that it happens immediately instead of wating for the
CheckRepoStats to run.

Signed-off-by: Loïc Dachary loic@dachary.org

---
[source](https://lab.forgefriends.org/forgefriends/forgefriends/-/merge_requests/34)
2 years ago
..
codebase.go Fix various typos (#18219) 3 years ago
codebase_test.go Add migrate from Codebase (#16768) 3 years ago
dump.go Simplify parameter types (#18006) 3 years ago
error.go Move migrations into services and base into modules/migration (#17663) 3 years ago
git.go Move migrations into services and base into modules/migration (#17663) 3 years ago
gitbucket.go Move migrations into services and base into modules/migration (#17663) 3 years ago
gitea_downloader.go Use `hostmatcher` to replace `matchlist`, improve security (#17605) 3 years ago
gitea_downloader_test.go Move migrations into services and base into modules/migration (#17663) 3 years ago
gitea_uploader.go Fix CheckRepoStats and reuse it during migration (#18264) 2 years ago
gitea_uploader_test.go Move repository model into models/repo (#17933) 3 years ago
github.go Use `hostmatcher` to replace `matchlist`, improve security (#17605) 3 years ago
github_test.go refactoring nits (#18188) 3 years ago
gitlab.go Use `hostmatcher` to replace `matchlist`, improve security (#17605) 3 years ago
gitlab_test.go refactoring nits (#18188) 3 years ago
gogs.go Fix various typos (#18219) 3 years ago
gogs_test.go refactoring nits (#18188) 3 years ago
http_client.go Use `hostmatcher` to replace `matchlist`, improve security (#17605) 3 years ago
main_test.go Add migrate from Codebase (#16768) 3 years ago
migrate.go Move repository model into models/repo (#17933) 3 years ago
migrate_test.go Move user related model into models/user (#17781) 3 years ago
onedev.go Fix various typos (#18219) 3 years ago
onedev_test.go Move migrations into services and base into modules/migration (#17663) 3 years ago
restore.go Simplify parameter types (#18006) 3 years ago
update.go Move more model into models/user (#17826) 3 years ago