github RayLabsHQ/gitea-mirror v3.7.1

latest release: v3.7.2
6 hours ago

v3.7.1 — Safe Archiving for Orphaned Mirrors (Attempted Fix)

  • Addresses “code rot” when the upstream GitHub repo is deleted/banned.
  • Mirror archiving now uses sanitized names to satisfy Gitea’s AlphaDashDot rule.
  • Cleanup resolves the correct Gitea owner before archiving to avoid 404s.
  • Adds “archived” status so the Repositories UI does not error.
  • Non-destructive: data preserved; mirror interval reduced best‑effort.

What’s Fixed

  • Mirror archive rename no longer fails with 422 AlphaDashDot.
    • Uses archived-; falls back to archived-- on conflicts/validation.
  • Owner resolution during cleanup prefers recorded mirroredLocation, then computes the expected Gitea owner and verifies presence to avoid
    GetUserByName 404s.
  • UI Zod validation now accepts archived status, preventing “Internal server error” on the Repositories page.

Behavior Changes

  • Archiving mirrors is non-destructive: repository is renamed (not deleted), an “ARCHIVED” notice is appended to the description, and mirror interval
    is lowered to 8760h (best‑effort).

Recommended Config

  • CLEANUP_DELETE_IF_NOT_IN_GITHUB=true
  • CLEANUP_ORPHANED_REPO_ACTION=archive
  • Optional: leave CLEANUP_DELETE_FROM_GITEA as-is; archiving is safe.

Verification Steps

  • Mirror a repo, then simulate the upstream disappearing (unstar/remove; or treat as orphan).
  • Trigger cleanup (scheduler or API).
  • Check logs for [Repository Cleanup] and [Archive] entries; event repository.archived is published.
  • In Gitea, repo should be renamed to archived- (or timestamped variant) and show an archived notice; mirror interval reduced.

Full Changelog: v3.7.0...v3.7.1

Don't miss a new gitea-mirror release

NewReleases is sending notifications on new releases.