mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-05-08 20:58:16 -05:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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.