From b9d096187ad59c3fcae17eef37eab0452eed0e94 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sun, 25 Aug 2024 07:21:40 +0300 Subject: [PATCH] fix: skip processing comments without a body in GitHub polling server --- pr_agent/servers/github_polling.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pr_agent/servers/github_polling.py b/pr_agent/servers/github_polling.py index 52c00552..64f4dea9 100644 --- a/pr_agent/servers/github_polling.py +++ b/pr_agent/servers/github_polling.py @@ -93,7 +93,9 @@ async def polling_loop(): if 'user' in comment and 'login' in comment['user']: if comment['user']['login'] == user_id: continue - comment_body = comment['body'] if 'body' in comment else '' + comment_body = comment.get('body', '') + if not comment_body: + continue commenter_github_user = comment['user']['login'] \ if 'user' in comment else '' get_logger().info(f"Polling, pr_url: {pr_url}",