[PR #249] [MERGED] fix: use recorded mirrored location for mirror-sync target #2117

Closed
opened 2026-05-03 03:05:07 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/249
Author: @arunavo4
Created: 3/25/2026
Status: Merged
Merged: 3/27/2026
Merged by: @arunavo4

Base: mainHead: codex/fix-issue-248-mirror-sync-target


📝 Commits (1)

  • 2da0277 fix sync target resolution for mirrored repos

📊 Changes

4 files changed (+176 additions, -27 deletions)

View changed files

📝 src/lib/gitea-enhanced.test.ts (+57 -0)
📝 src/lib/gitea-enhanced.ts (+118 -24)
📝 src/pages/activity.astro (+0 -1)
📝 src/pages/index.astro (+1 -2)

📄 Description

Summary

  • fix sync target resolution to prefer the repository's recorded mirroredLocation before falling back to owner resolution from current config
  • update sync follow-up operations (mirror interval patch, backup target, metadata sync targets, and persisted mirroredLocation) to use the resolved sync target
  • reduce noisy server logs by removing Job ... has no log data warnings from page rendering
  • add regression test covering owner-resolution drift vs recorded mirror location

Why

Some users hit HTTP 405: Method Not Allowed during sync even though mirroring previously worked. This happened when sync used a newly computed owner path that no longer matched where the mirror actually exists in Gitea.

Testing

  • bun test src/lib/gitea-enhanced.test.ts
  • bun test src/lib/mirror-sync-errors.test.ts
  • bun run build

Closes #248


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/RayLabsHQ/gitea-mirror/pull/249 **Author:** [@arunavo4](https://github.com/arunavo4) **Created:** 3/25/2026 **Status:** ✅ Merged **Merged:** 3/27/2026 **Merged by:** [@arunavo4](https://github.com/arunavo4) **Base:** `main` ← **Head:** `codex/fix-issue-248-mirror-sync-target` --- ### 📝 Commits (1) - [`2da0277`](https://github.com/RayLabsHQ/gitea-mirror/commit/2da0277a68923175a8589393ff11e13bdf82ccff) fix sync target resolution for mirrored repos ### 📊 Changes **4 files changed** (+176 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/gitea-enhanced.test.ts` (+57 -0) 📝 `src/lib/gitea-enhanced.ts` (+118 -24) 📝 `src/pages/activity.astro` (+0 -1) 📝 `src/pages/index.astro` (+1 -2) </details> ### 📄 Description ## Summary - fix sync target resolution to prefer the repository's recorded `mirroredLocation` before falling back to owner resolution from current config - update sync follow-up operations (mirror interval patch, backup target, metadata sync targets, and persisted `mirroredLocation`) to use the resolved sync target - reduce noisy server logs by removing `Job ... has no log data` warnings from page rendering - add regression test covering owner-resolution drift vs recorded mirror location ## Why Some users hit `HTTP 405: Method Not Allowed` during sync even though mirroring previously worked. This happened when sync used a newly computed owner path that no longer matched where the mirror actually exists in Gitea. ## Testing - `bun test src/lib/gitea-enhanced.test.ts` - `bun test src/lib/mirror-sync-errors.test.ts` - `bun run build` Closes #248 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-03 03:05:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea-mirror#2117