auto-sync: 2026-06-09 11:16:05
This commit is contained in:
@@ -400,8 +400,11 @@ async def _handle_issues(payload: Dict[str, Any]) -> None:
|
||||
|
||||
async def _handle_issue_comment(payload: Dict[str, Any]) -> None:
|
||||
"""处理 issue_comment 事件:CI 失败关键词 → 通知 PR 作者。"""
|
||||
# DEBUG: log full payload for investigation
|
||||
logger.info("issue_comment FULL PAYLOAD: %s", json.dumps(payload, ensure_ascii=False)[:3000])
|
||||
# DEBUG: dump full payload to file for investigation
|
||||
_debug_payload_dir = Path(get_data_root()) / "_debug"
|
||||
_debug_payload_dir.mkdir(parents=True, exist_ok=True)
|
||||
(_debug_payload_dir / f"issue_comment_payload_{int(time.time())}.json").write_text(
|
||||
json.dumps(payload, ensure_ascii=False, indent=2))
|
||||
comment = payload.get("comment")
|
||||
if not comment or not isinstance(comment, dict):
|
||||
logger.warning("issue_comment event missing comment field, skipping")
|
||||
@@ -484,9 +487,6 @@ async def gitea_webhook(
|
||||
"""
|
||||
body = await request.body()
|
||||
|
||||
# 0. DEBUG: log all webhook events
|
||||
logger.info("WEBHOOK DEBUG event=%s delivery=%s", x_gitea_event, x_gitea_delivery)
|
||||
|
||||
# 1. 签名验证
|
||||
if not _verify_signature(body, x_gitea_signature):
|
||||
logger.warning("Webhook signature verification failed")
|
||||
|
||||
Reference in New Issue
Block a user