Conversation
…161, #165) ## Issues Fixed ### Issue #161: Incorrect open/closed status after import - Root cause: Gitea API creates issues as open first, then closes them in a separate step - This two-step process can fail silently due to rate limiting or API errors - Solution: Added explicit verification after issue creation - If closed state wasn't applied, use PATCH to explicitly close the issue - Added comprehensive error handling and logging - Applied same fix to both issue and PR mirroring paths ### Issue #165: New issues/PRs not syncing after initial mirror - Root cause: Boolean flags (issues: true) prevented subsequent syncs - Once marked as "mirrored", new/updated items were permanently skipped - Solution: Implemented incremental sync with timestamp tracking - Track componentLastSynced timestamps for each metadata component - Use GitHub's 'since' parameter to fetch only updated items - Implement duplicate detection to prevent creating duplicates - Update timestamps only after successful sync ## Optimizations - **Efficient duplicate detection**: Uses 'since' parameter when fetching existing Gitea issues - Reduces API calls by only checking recently updated issues - Significantly faster for repos with many issues (100s or 1000s) - Reduces pagination overhead - **Improved PR detection**: Uses PR number extraction (regex) instead of title matching - More robust against PR status/title changes - Handles "[PR #123]", "[PR #123] [MERGED]", etc. - **Pagination with safety limits**: Max 10 pages (1000 items) to balance completeness and performance ## Edge Cases Handled 1. Network timeouts between create and close operations 2. Rate limiting during two-step issue creation 3. Large repos with >1000 issues/PRs 4. PR status changes affecting title format 5. Timestamp updates only on successful sync (prevents missed items on failures) ## Testing - All 111 tests passing - Verified alignment with Gitea v1.25.3 and v1.26.0-dev source code - Tested incremental sync behavior with timestamp tracking ## Files Changed - src/lib/metadata-state.ts: Added componentLastSynced timestamps - src/lib/gitea.ts: Status verification, incremental sync, optimized duplicate detection - src/lib/gitea-enhanced.ts: Timestamp management and incremental sync orchestration
- Bump version to 3.10.0 - Update Astro to 5.16.9 (from 5.16.4) - Update Better Auth to 1.4.12 (from 1.4.5) - Update React to 19.2.3 (from 19.2.1) - Update Tailwind CSS to 4.1.18 (from 4.1.17) - Update Drizzle ORM to 0.45.1 (from 0.44.7) - Update Zod to 4.3.5 (from 4.1.13) - Update other minor dependencies (lucide-react, types, etc.) - Update Bun to 1.3.6 (from 1.3.3) All tests passing (111 pass, 4 skip, 0 fail)
Deploying gitea-mirror-website with
|
| Latest commit: |
723b4f4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cd0d1f83.gitea-mirror-website.pages.dev |
| Branch Preview URL: | https://fix-issue-161-165-sync-impro.gitea-mirror-website.pages.dev |
🐳 Docker Image Built SuccessfullyYour PR image is available for testing: Image Tag: Pull and Testdocker pull ghcr.io/raylabshq/gitea-mirror:pr-166
docker run -d -p 4321:4321 -e BETTER_AUTH_SECRET=your-secret-here -e BETTER_AUTH_URL=http://localhost:4321 --name gitea-mirror-test ghcr.io/raylabshq/gitea-mirror:pr-166Docker Compose Testingservices:
gitea-mirror:
image: ghcr.io/raylabshq/gitea-mirror:pr-166
ports:
- "4321:4321"
environment:
- BETTER_AUTH_SECRET=your-secret-here
- BETTER_AUTH_URL=http://localhost:4321
- BETTER_AUTH_TRUSTED_ORIGINS=http://localhost:4321
📦 View in GitHub Packages |
🔍 Vulnerabilities of
|
| digest | sha256:8ad42c66cb55e8eae3fbfe3ded97f465e94d192bf57ec750d0f32b090151ee53 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 380 MB |
| packages | 969 |
📦 Base Image debian:bookworm
| also known as |
|
| digest | sha256:9d8be01b7374ef07c68468882782c1226c532f39145f46ad969b6fbd414ab730 |
| vulnerabilities |
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||
Description
|
Overview
Labels (8 changes)
-org.opencontainers.image.created=2026-01-13T08:07:57.125Z
+org.opencontainers.image.created=2025-11-21T19:33:53.930Z
-org.opencontainers.image.description=Gitea Mirror auto-syncs GitHub repos to your self-hosted Gitea/Forgejo, with a sleek Web UI and easy Docker deployment.
+org.opencontainers.image.description=Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
-org.opencontainers.image.licenses=AGPL-3.0
+org.opencontainers.image.licenses=NOASSERTION
-org.opencontainers.image.revision=723b4f4dc6866c05846084ba86de24c7389fd3c5
+org.opencontainers.image.revision=abb1b0c4d75acabf1742b951a1f739068c94a7bd
-org.opencontainers.image.source=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.source=https://github.com/oven-sh/bun
-org.opencontainers.image.title=gitea-mirror
+org.opencontainers.image.title=bun
-org.opencontainers.image.url=https://github.com/RayLabsHQ/gitea-mirror
+org.opencontainers.image.url=https://github.com/oven-sh/bun
-org.opencontainers.image.version=pr-166
+org.opencontainers.image.version=1.3.3-debian |
No description provided.