mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 13:20:39 +08:00
Ignore comment not starting with a slash
This commit is contained in:
@ -92,6 +92,9 @@ async def handle_request(body: Dict[str, Any], event: str):
|
|||||||
if "comment" not in body:
|
if "comment" not in body:
|
||||||
return {}
|
return {}
|
||||||
comment_body = body.get("comment", {}).get("body")
|
comment_body = body.get("comment", {}).get("body")
|
||||||
|
if not comment_body.lsstrip().startswith("/"):
|
||||||
|
get_logger().info("Ignoring comment not starting with /")
|
||||||
|
return {}
|
||||||
if sender and bot_user in sender:
|
if sender and bot_user in sender:
|
||||||
get_logger().info(f"Ignoring comment from {bot_user} user")
|
get_logger().info(f"Ignoring comment from {bot_user} user")
|
||||||
return {}
|
return {}
|
||||||
|
Reference in New Issue
Block a user