github arunavo4/gitea-mirror v2.10.0

latest releases: v3.0.2, v3.0.1, v3.0.0...
3 months ago

๐Ÿ› 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 fix
  • src/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

Don't miss a new gitea-mirror release

NewReleases is sending notifications on new releases.