[PR #184] [MERGED] Implement incremental issue and PR metadata sync #171

Closed
opened 2026-02-27 15:55:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/184
Author: @arunavo4
Created: 2/24/2026
Status: Merged
Merged: 2/24/2026
Merged by: @arunavo4

Base: mainHead: codex/issue-165-incremental-metadata


📝 Commits (2)

  • 85b1867 Implement incremental issue and PR metadata sync
  • cb7510f Improve legacy matching and comment dedupe

📊 Changes

3 files changed (+270 additions, -118 deletions)

View changed files

📝 src/lib/gitea-enhanced.test.ts (+3 -3)
📝 src/lib/gitea-enhanced.ts (+2 -18)
📝 src/lib/gitea.ts (+265 -97)

📄 Description

Summary

  • remove the skip-forever gate for issues/PR metadata on sync
  • make issue mirroring idempotent by upserting based on GitHub issue number markers
  • backfill legacy issue entries by one-time title matching when possible
  • prevent duplicate mirrored comments using a hidden gh-comment-id marker
  • make PR mirroring idempotent by updating existing [PR #N] entries instead of recreating
  • update tests to assert incremental re-sync behavior

Why

Fixes the behavior in #165 where issue/PR metadata stopped updating after the first sync.

Validation

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

Fixes #165


🔄 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/184 **Author:** [@arunavo4](https://github.com/arunavo4) **Created:** 2/24/2026 **Status:** ✅ Merged **Merged:** 2/24/2026 **Merged by:** [@arunavo4](https://github.com/arunavo4) **Base:** `main` ← **Head:** `codex/issue-165-incremental-metadata` --- ### 📝 Commits (2) - [`85b1867`](https://github.com/RayLabsHQ/gitea-mirror/commit/85b1867490f7b82b62cf32db519b0cac65728cb2) Implement incremental issue and PR metadata sync - [`cb7510f`](https://github.com/RayLabsHQ/gitea-mirror/commit/cb7510f79ddc8422cc1a2375180adb7a8655934b) Improve legacy matching and comment dedupe ### 📊 Changes **3 files changed** (+270 additions, -118 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/gitea-enhanced.test.ts` (+3 -3) 📝 `src/lib/gitea-enhanced.ts` (+2 -18) 📝 `src/lib/gitea.ts` (+265 -97) </details> ### 📄 Description ## Summary - remove the skip-forever gate for issues/PR metadata on sync - make issue mirroring idempotent by upserting based on GitHub issue number markers - backfill legacy issue entries by one-time title matching when possible - prevent duplicate mirrored comments using a hidden `gh-comment-id` marker - make PR mirroring idempotent by updating existing `[PR #N]` entries instead of recreating - update tests to assert incremental re-sync behavior ## Why Fixes the behavior in #165 where issue/PR metadata stopped updating after the first sync. ## Validation - `bun test src/lib/gitea-enhanced.test.ts` - `bun test src/lib/gitea.test.ts src/lib/mirror-sync-fix.test.ts` - `bun run build` Fixes #165 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 15:55:25 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gitea-mirror#171
No description provided.