๐ Bug Fixes
Fixed Organizations Getting Stuck on "Mirroring" Status When Empty
Issue: Organizations with no repositories would get stuck in "mirroring" status and never transition to "mirrored", causing confusion about whether the mirroring process completed successfully.
Solution:
- Fixed the
mirrorGitHubOrgToGitea
function to properly handle empty organizations - Organizations now correctly transition from "mirroring" to "mirrored" status regardless of repository count
- Enhanced status lifecycle consistency for all organizations
โจ Improvements
Enhanced User Experience
- Better Activity Log Messages: Clear distinction between empty and non-empty organization processing
- Empty orgs: "Organization {name} was processed successfully (no repositories found)."
- Non-empty orgs: "Organization {name} was mirrored to Gitea with {count} repositories."
Improved Logging
- Console Logging: Added clearer log messages for empty organization scenarios
- Debug Information: Better visibility into organization processing workflow
๐งช Testing
New Test Coverage
- Added comprehensive test case:
mirrorGitHubOrgToGitea handles empty organizations correctly
- Verifies proper status transitions for empty organizations
- Ensures correct activity log generation
Test Results
- โ 40 tests across 9 files
- โ 105 expect() calls
- โ All existing functionality preserved
- โ No regressions detected
๐ง Technical Details
Files Modified
src/lib/gitea.ts
- Core mirroring logic fixsrc/lib/gitea.test.ts
- Added test coverage
Key Changes
- Restructured conditional logic to prevent early returns for empty organizations
- Ensured success logic executes for both empty and non-empty organizations
- Enhanced error handling and user feedback
๐ Migration Notes
This is a bug fix release with no breaking changes. Users can upgrade directly from any v2.x version.
For Users Experiencing the Issue
- Organizations previously stuck in "mirroring" status will need to be re-mirrored
- The fix prevents new occurrences of the issue
- Existing mirrored organizations are unaffected
๐ Installation
Docker
docker pull ghcr.io/arunavo4/gitea-mirror:v2.10.0
From Source
git checkout v2.10.0
bun install
bun run build
Full Changelog: v2.9.3...v2.10.0