bebbda9 fix: ensure correct open/closed status when mirroring issues (#161)
📊 Changes
1 file changed (+90 additions, -2 deletions)
View changed files
📝src/lib/gitea.ts (+90 -2)
📄 Description
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:
Issue Status Verification (mirrorGitRepoIssuesToGitea):
- 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
PR Status Verification (mirrorGitRepoPullRequestsToGitea):
- 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
Content Validation:
- 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.
🔄 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/162
**Author:** [@arunavo4](https://github.com/arunavo4)
**Created:** 12/25/2025
**Status:** ✅ Merged
**Merged:** 2/24/2026
**Merged by:** [@arunavo4](https://github.com/arunavo4)
**Base:** `main` ← **Head:** `fix/issue-161-status-sync`
---
### 📝 Commits (1)
- [`bebbda9`](https://github.com/RayLabsHQ/gitea-mirror/commit/bebbda946583ace663f05584dd7decc3686c1390) fix: ensure correct open/closed status when mirroring issues (#161)
### 📊 Changes
**1 file changed** (+90 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/gitea.ts` (+90 -2)
</details>
### 📄 Description
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:
1. Issue Status Verification (mirrorGitRepoIssuesToGitea):
- 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
2. PR Status Verification (mirrorGitRepoPullRequestsToGitea):
- 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
3. Content Validation:
- 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.
---
<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/162
Author: @arunavo4
Created: 12/25/2025
Status: ✅ Merged
Merged: 2/24/2026
Merged by: @arunavo4
Base:
main← Head:fix/issue-161-status-sync📝 Commits (1)
bebbda9fix: ensure correct open/closed status when mirroring issues (#161)📊 Changes
1 file changed (+90 additions, -2 deletions)
View changed files
📝
src/lib/gitea.ts(+90 -2)📄 Description
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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.