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.
gitea/services/migrations
Lunny Xiao b6379d2f16
Change the default maxPerPage for gitbucket (#30392) (#30471)
Backport #30392 

This patch improves the migration from gitbucket to gitea.

The gitbucket uses it's own internal perPage value (= 25) for paging and
ignore per_page arguments in the requested URL. This cause gitea to
migrate only 25 issues and 25 PRs from gitbucket repository. This may
not happens on old gitbucket. But recent gitbucket 4.40 or 4.38.4 has
this problem.

This patch change to use this internally hardcoded perPage of gitbucket
as gitea's maxPerPage numer when migrating from gitbucket. There are
several perPage values in gitbucket like 25 for Isseus/PRs and 10 for
Releases. Some of those API doesn't support paging yet. It sounds
difficult to implement, but using the minimum number among them worked
out very well. So, I use 10 in this patch.

Brief descriptions of problems and this patch are also available in
https://github.com/go-gitea/gitea/issues/30316.

In addition, I'm not sure what kind of test cases are possible to write
here. It's a test for migration, so it requires testing gitbucket server
and gitea server, I guess. Please let me know if it is possible to write
such test cases here. Thanks!

Co-authored-by: Kazushi (Jam) Marukawa <jam@pobox.com>
11 months ago
..
codebase.go Replace `interface{}` with `any` (#25686) 2 years ago
codebase_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
common.go Replace `interface{}` with `any` (#25686) 2 years ago
dump.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
error.go Update github.com/google/go-github to v53 (#25157) 2 years ago
git.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitbucket.go Change the default maxPerPage for gitbucket (#30392) (#30471) 11 months ago
gitea_downloader.go Fix DownloadFunc when migrating releases (#27887) (#27890) 1 year ago
gitea_downloader_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitea_uploader.go Only migrate the first 255 chars of a Github issue title (#28902) (#28912) 1 year ago
gitea_uploader_test.go Next round of `db.DefaultContext` refactor (#27089) 1 year ago
github.go Fix panic when migrating a repo from GitHub with issues (#25246) 2 years ago
github_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
gitlab.go Use known issue IID to generate new PR index number when migrating from GitLab (#28616) (#28618) 1 year ago
gitlab_test.go Use known issue IID to generate new PR index number when migrating from GitLab (#28616) (#28618) 1 year ago
gogs.go Rewrite logger system (#24726) 2 years ago
gogs_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
http_client.go Implement FSFE REUSE for golang files (#21840) 2 years ago
main_test.go Scoped labels (#22585) 2 years ago
migrate.go Fix duplicate migrated milestones (#30102) (#30105) 11 months ago
migrate_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
onedev.go Replace `interface{}` with `any` (#25686) 2 years ago
onedev_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
restore.go Implement FSFE REUSE for golang files (#21840) 2 years ago
update.go Another round of `db.DefaultContext` refactor (#27103) (#27262) 1 year ago