mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-11-16 14:45:02 -06:00
[PR #344] [MERGED] fix: honor destination overrides in bulk org mirroring and crash recovery #8956
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/344
Author: @YuzuZensai
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/16/2026
Merged by: @arunavo4
Base:
main← Head:main📝 Commits (2)
847e751🐛 fix: honor destination overrides when recovering interrupted mirror jobs67eb345🐛 fix: resolve bulk org mirror destinations correctly📊 Changes
2 files changed (+35 additions, -24 deletions)
View changed files
📝
src/lib/gitea.ts(+29 -8)📝
src/lib/recovery.ts(+6 -16)📄 Description
Summary
Fixes: #343
Destination Organization overrides (org-level and per-repo
destinationOrg) only worked on the single-repo mirror path. Bulk Mirror Organization and crash recovery had their own destination logic instead of using the canonical resolver, causing the followingOrg/repo destination overrides silently ignored on bulk mirror. Repos landed in whatever target the strategy would normally pick, as if no override had been set
mixedstrategy falling into the flat-user fallback on bulk mirror, dumping org repos into the personal account.Starred repos in a bulk mirror not following starred-repo mode under
preserve/single-org(routed into the org target) andmixed(personal account).Recovered jobs re-routing repos by GitHub org name via the legacy(?)
preserveOrgStructureflag.See #343 for the full root cause writeup.
Changes
src/lib/gitea.ts,mirrorGitHubOrgToGitea()destinationOrgoverride before any strategy logic.getGiteaRepoOwnerAsync(), then route to the pre-created target org, the user account, or an on-demand org. This fixes overrides,mixed, and starred handling in one place, so the bulk path can no longer drift from the single-repo path.src/lib/recovery.tsmirrorGithubRepoToGitea(), which resolves the destination itself, instead of pre-routing org repos by GitHub org name.No schema, API, or UI changes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.