fix: ensure correct open/closed status when mirroring issues (#161)#162
fix: ensure correct open/closed status when mirroring issues (#161)#162
Conversation
Add verification and explicit close fallback after issue creation to handle Gitea API's two-step close process that can fail silently.
Deploying gitea-mirror-website with
|
| Latest commit: |
bebbda9
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e3621c70.gitea-mirror-website.pages.dev |
| Branch Preview URL: | https://fix-issue-161-status-sync.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-162
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-162Docker Compose Testingservices:
gitea-mirror:
image: ghcr.io/raylabshq/gitea-mirror:pr-162
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:a1838de9d5f1b8b8af7ac3966ba84fe694d7ee21c0e89e82615bf997d0abf46c |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 381 MB |
| packages | 981 |
📦 Base Image debian:bookworm
| also known as |
|
| digest | sha256:9d8be01b7374ef07c68468882782c1226c532f39145f46ad969b6fbd414ab730 |
| vulnerabilities |
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||
Description
Description
|
Overview
Labels (8 changes)
-org.opencontainers.image.created=2025-12-25T08:37:16.489Z
+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=bebbda946583ace663f05584dd7decc3686c1390
+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-162
+org.opencontainers.image.version=1.3.3-debian |
Add verification and explicit close fallback after issue creation to
handle Gitea API's two-step close process that can fail silently.
What was fixed:
- After creating an issue, verifies if the closed state was actually applied
- If not closed, explicitly PATCHes the issue to close it
- Logs warnings for debugging when the fallback is triggered
- Same fix applied to both the enriched and basic issue creation paths
- Verifies closed/merged PRs are actually closed in Gitea
- Explicit PATCH fallback if the initial creation didn't apply the state
- Added warning log when body content appears to be missing after sync
- Helps identify repos with content sync issues
Root Cause:
Gitea's API first creates issues as open, then closes them separately. This two-step process can fail silently due to rate limiting, timeouts, or other errors - leaving issues in an incorrect open state.