mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
fix: move user_tag variable declaration outside conditional block
This commit is contained in:
@ -84,6 +84,7 @@ async def is_valid_notification(notification, headers, handled_ids, session, use
|
|||||||
return False, handled_ids
|
return False, handled_ids
|
||||||
async with session.get(latest_comment, headers=headers) as comment_response:
|
async with session.get(latest_comment, headers=headers) as comment_response:
|
||||||
check_prev_comments = False
|
check_prev_comments = False
|
||||||
|
user_tag = "@" + user_id
|
||||||
if comment_response.status == 200:
|
if comment_response.status == 200:
|
||||||
comment = await comment_response.json()
|
comment = await comment_response.json()
|
||||||
if 'id' in comment:
|
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")
|
get_logger().debug(f"no comment_body")
|
||||||
check_prev_comments = True
|
check_prev_comments = True
|
||||||
else:
|
else:
|
||||||
user_tag = "@" + user_id
|
|
||||||
if user_tag not in comment_body:
|
if user_tag not in comment_body:
|
||||||
get_logger().debug(f"user_tag not in comment_body")
|
get_logger().debug(f"user_tag not in comment_body")
|
||||||
check_prev_comments = True
|
check_prev_comments = True
|
||||||
|
Reference in New Issue
Block a user