mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-13 19:35:17 +00:00
Merge pull request #686 from Codium-ai/tr/reduce_number_of_calls
Tr/reduce number of calls
This commit is contained in:
commit
764aa8d679
2 changed files with 4 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ def apply_repo_settings(pr_url):
|
|||
git_provider = get_git_provider()(pr_url)
|
||||
repo_settings = git_provider.get_repo_settings()
|
||||
try:
|
||||
context.set("repo_settings", repo_settings)
|
||||
context["repo_settings"] = repo_settings
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,9 @@ async def handle_request(body: Dict[str, Any], event: str):
|
|||
if "comment" not in body:
|
||||
return {}
|
||||
comment_body = body.get("comment", {}).get("body")
|
||||
if comment_body and isinstance(comment_body, str) and not comment_body.lstrip().startswith("/"):
|
||||
get_logger().info("Ignoring comment not starting with /")
|
||||
return {}
|
||||
if sender and bot_user in sender:
|
||||
get_logger().info(f"Ignoring comment from {bot_user} user")
|
||||
return {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue