feat: implement Codeberg → Gitea repo migrator
Replay git (mirror + LFS), labels, milestones, issues & PRs (with comments), and releases (with assets) entity-by-entity over the shared Forgejo/Gitea REST API. Two-pass issue/PR creation rewrites #NNN and URL cross-references to the target number space; deleted-branch PR heads are recreated as refs/heads/_pr/<n>. CLI: codeberg-to-gitea migrate owner/name (CODEBERG_TOKEN/GITEA_TOKEN) Verified end-to-end on AlexKucera/helm: 283 issues, 1 PR, 19 labels, 219 comments, git history, with cross-refs correctly rewritten.
This commit is contained in:
1 parent
601cf4c41e
commit
ab43b0311e
14 files changed
+1240
-23
No files matched your search
+5
-4
@@ -2,8 +2,7 @@
|
||||
|
||||
## Purpose
|
||||
|
||||
Pytest suite for `codeberg_to_gitea_migrator`. Currently a smoke test asserting
|
||||
the package imports and reports its version.
|
||||
Pytest suite for `codeberg_to_gitea_migrator`.
|
||||
|
||||
## Ownership
|
||||
|
||||
@@ -16,8 +15,10 @@ Project maintainer (Alexander Kucera).
|
||||
|
||||
## Work Guidance
|
||||
|
||||
- Add focused tests alongside each migration module.
|
||||
- Keep network calls behind a fake/recorded client — do not hit live Codeberg/Gitea from tests.
|
||||
- `test_smoke.py` — package imports + version.
|
||||
- `test_refs.py` — `#NNN`/URL cross-reference rewrite + `NumberMap`.
|
||||
- `test_clients.py` — `ApiClient` pagination, param cleaning, 4xx handling, JSON POST, all via `httpx.MockTransport` (no network).
|
||||
- Keep tests network-free: never hit live Codeberg/Gitea from the suite. The end-to-end run is a manual CLI invocation, not a test.
|
||||
|
||||
## Verification
|
||||
|
||||
|
||||
Reference in new issue
Block a user