1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 14:14:25 +00:00
gitea/services/migrations
Giteabot b941d7485b
Change the default maxPerPage for gitbucket (#30392) (#30425)
Backport #30392 by @jam7

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>
2024-04-12 11:23:34 +00:00
..
codebase_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
codebase.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
common.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
dump.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
error.go Bump google/go-github to v57 (#28514) 2023-12-18 15:42:04 -06:00
git.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
gitbucket.go Change the default maxPerPage for gitbucket (#30392) (#30425) 2024-04-12 11:23:34 +00:00
gitea_downloader_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
gitea_downloader.go Fix DownloadFunc when migrating releases (#27887) 2023-11-03 15:56:53 +08:00
gitea_uploader_test.go remove util.OptionalBool and related functions (#29513) 2024-03-02 16:42:31 +01:00
gitea_uploader.go Move migration functions to services layer (#29497) 2024-03-01 02:23:00 +00:00
github_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
github.go Bump google/go-github to v57 (#28514) 2023-12-18 15:42:04 -06:00
gitlab_test.go Properly migrate target branch change GitLab comment (#29340) 2024-02-24 07:49:16 +00:00
gitlab.go Include resource state events in Gitlab downloads (#29382) 2024-02-26 05:08:21 +01:00
gogs_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
gogs.go Rewrite logger system (#24726) 2023-05-21 22:35:11 +00:00
http_client.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
migrate_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
migrate.go Fix duplicate migrated milestones (#30102) 2024-03-26 10:20:26 +00:00
onedev_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
onedev.go Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
restore.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
update.go Use db.Find instead of writing methods for every object (#28084) 2023-11-24 03:49:41 +00:00