diff --git a/pr_agent/servers/github_polling.py b/pr_agent/servers/github_polling.py index 5eab94dc..05ce0ad1 100644 --- a/pr_agent/servers/github_polling.py +++ b/pr_agent/servers/github_polling.py @@ -84,6 +84,7 @@ async def is_valid_notification(notification, headers, handled_ids, session, use return False, handled_ids async with session.get(latest_comment, headers=headers) as comment_response: check_prev_comments = False + user_tag = "@" + user_id if comment_response.status == 200: comment = await comment_response.json() if 'id' in comment: @@ -101,7 +102,6 @@ async def is_valid_notification(notification, headers, handled_ids, session, use get_logger().debug(f"no comment_body") check_prev_comments = True else: - user_tag = "@" + user_id if user_tag not in comment_body: get_logger().debug(f"user_tag not in comment_body") check_prev_comments = True