From cbec9eddb5d950e1bd7c5824f03f1f2b2e5ffb91 Mon Sep 17 00:00:00 2001 From: Raykov-MS Date: Thu, 5 Mar 2026 20:39:18 +0300 Subject: [PATCH] add logs --- main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.py b/main.py index 3d342a2..b5de6d4 100644 --- a/main.py +++ b/main.py @@ -1116,16 +1116,26 @@ async def gitea_webhook( log_error("gitea webhook invalid json", exc) raise HTTPException(status_code=400, detail="Некорректный JSON") from exc log_info(f"[gitea] event={x_gitea_event} action={payload.get('action')}") + log_info( + "[route] " + f"event={x_gitea_event} action={payload.get('action')} " + f"has_comment={bool(payload.get('comment'))} " + f"has_review={bool(payload.get('review'))} " + f"is_pull={bool(payload.get('is_pull'))}" + ) try: if x_gitea_event == "issue_comment": + log_info("[route] -> handle_issue_comment") await handle_issue_comment(payload) return {"ok": "true"} if x_gitea_event == "pull_request_comment": if payload.get("comment"): + log_info("[route] -> handle_pull_request_comment (comment)") await handle_pull_request_comment(payload) elif payload.get("review"): + log_info("[route] -> handle_pr_reviewed (from pull_request_comment)") await handle_pr_reviewed(payload) return {"ok": "true"}