feat: atomic extract-and-connect + stale PR monitor + response audit #4

Merged
m3taversal merged 70 commits from epimetheus/atomic-connect-and-stale-monitor into main 2026-03-30 11:03:35 +00:00
Showing only changes of commit 410cf32cfe - Show all commits

View file

@ -38,6 +38,12 @@ async def api(method: str, path: str, body: dict = None, token: str = None):
return None
if resp.status == 204:
return {}
# Forgejo sometimes returns 200 with HTML (not JSON) on merge success.
# Treat 200 with non-JSON content-type as success rather than error.
content_type = resp.content_type or ""
if "json" not in content_type:
logger.debug("Forgejo API %s %s%d (non-JSON: %s), treating as success", method, path, resp.status, content_type)
return {}
return await resp.json()
except Exception as e:
logger.error("Forgejo API error: %s %s%s", method, path, e)