-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to import repository data from an exported data of Github #18165
base: main
Are you sure you want to change the base?
Conversation
we should add some hints into our docu at the migration section ... (where to download at github and how to import ...) |
Will do that after the PR finished. |
ec12d24
to
758046c
Compare
758046c
to
4d5399f
Compare
The archive contains a |
Done. |
322c907
to
45f36fc
Compare
Codecov Report
@@ Coverage Diff @@
## main #18165 +/- ##
=======================================
Coverage ? 46.30%
=======================================
Files ? 847
Lines ? 122308
Branches ? 0
=======================================
Hits ? 56635
Misses ? 58814
Partials ? 6859
Continue to review full report at Codecov.
|
a201873
to
01a042e
Compare
8947a13
to
cbf4e57
Compare
cbf4e57
to
24e3458
Compare
…tea into lunny/import_github_export_data
@lunny I've put the code snippets from the OP into a script, maybe its helpful: https://gist.github.com/pat-s/7d8f8432c0e5afe941c28e6e345f38ea |
…tea into lunny/import_github_export_data
…tea into lunny/import_github_export_data
Due to some merge errors like Update: Due to being busy with other matters, I am currently not able to continue working on this PR. Sorry. |
May i respectfully ask if there is an update on this? It looks like somebody was working on this months ago? |
could you resolve the conflicts? thanks :) |
How to export migrations archive from Github
ref: https://docs.github.com/en/rest/reference/migrations
All the progress should be done via Github REST API v3, you can use curl or other tools to do that currently. It seems it currently only supports organization repositories but not individual repositories.
You can create a migration to include multiple repositories, but Gitea in this PR only supports one repository.
Remember the response of the first curl command and input the migration_id into the second curl command. The status maybe
pending
,exported
.When it's
exported
, you can download the archive. If it'spending
, repeat the status check until it becomesexported
.The last step is to download the archive into your disk.
How to import the Github migrations archive into Gitea
In this PR, only a sub command of Gitea has been implemented to restore a Github migrations archive into Gitea.
i.e.
This command will restore the Gitea's test_repo repository migration archive from the Gitea's testdata directory into the Gitea instance. It requires Gitea instance is running.
Progress and TODO
Almost features are finished, and users could help to verify it. But something left needs to do.
Something ignored
TODO(Not the PR)