mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-10-31 22:38:58 +00:00
e702e79625
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> (cherry picked from commit b6379d2f167551560c870d2d705269c9ba6fc3bc) |
||
---|---|---|
.. | ||
testdata/gitlab/full_download | ||
codebase.go | ||
codebase_test.go | ||
common.go | ||
dump.go | ||
error.go | ||
forgejo_downloader.go | ||
git.go | ||
gitbucket.go | ||
gitea_downloader.go | ||
gitea_downloader_test.go | ||
gitea_uploader.go | ||
gitea_uploader_test.go | ||
github.go | ||
github_test.go | ||
gitlab.go | ||
gitlab_test.go | ||
gogs.go | ||
gogs_test.go | ||
http_client.go | ||
main_test.go | ||
migrate.go | ||
migrate_test.go | ||
onedev.go | ||
onedev_test.go | ||
restore.go | ||
update.go |