mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-24 23:05:53 +03:00
[PR #190] [MERGED] Add pre-sync snapshot protection for mirror rewrites #177
Labels
No labels
bug
documentation
enhancement
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gitea-mirror#177
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/190
Author: @arunavo4
Created: 2/26/2026
Status: ✅ Merged
Merged: 2/26/2026
Merged by: @arunavo4
Base:
main← Head:codex/pre-sync-backup-guard📝 Commits (4)
043c1cfadd pre-sync snapshot protection76d12c4stabilize test module mocks91e6efbfix cross-test gitea mock exports2e29f6cfix gitea mock strategy behavior📊 Changes
12 files changed (+546 additions, -8 deletions)
View changed files
📝
src/components/config/ConfigTabs.tsx(+4 -0)📝
src/components/config/GiteaConfigForm.tsx(+79 -2)📝
src/lib/db/schema.ts(+4 -0)📝
src/lib/gitea-enhanced.test.ts(+146 -1)📝
src/lib/gitea-enhanced.ts(+60 -0)📝
src/lib/gitea-starred-repos.test.ts(+13 -2)📝
src/lib/gitea.test.ts(+49 -1)➕
src/lib/repo-backup.ts(+164 -0)📝
src/lib/utils/config-defaults.ts(+4 -0)📝
src/lib/utils/config-mapper.ts(+8 -0)📝
src/pages/api/job/mirror-repo.test.ts(+11 -2)📝
src/types/config.ts(+4 -0)📄 Description
Summary
Why
Mirror sync currently follows upstream history rewrites (including destructive force-pushes). This adds restore points so users can recover prior state.
Testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.