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.
🔄 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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 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:
main← Head:codex/fix-issue-248-mirror-sync-target📝 Commits (1)
2da0277fix 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
mirroredLocationbefore falling back to owner resolution from current configmirroredLocation) to use the resolved sync targetJob ... has no log datawarnings from page renderingWhy
Some users hit
HTTP 405: Method Not Allowedduring 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.tsbun test src/lib/mirror-sync-errors.test.tsbun run buildCloses #248
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.