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.
747 B
747 B
tests
Purpose
Pytest suite for codeberg_to_gitea_migrator.
Ownership
Project maintainer (Alexander Kucera).
Local Contracts
- pytest
testpaths = ["tests"](rootpyproject.toml). - Test files named
test_*.py; test functionstest_*.
Work Guidance
test_smoke.py— package imports + version.test_refs.py—#NNN/URL cross-reference rewrite +NumberMap.test_clients.py—ApiClientpagination, param cleaning, 4xx handling, JSON POST, all viahttpx.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
pytestfrom the repo root.
Child DOX Index
- No children.