mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 05:10:38 +08:00
Add logging context to command execution in pr_agent.py
This commit is contained in:
@ -69,20 +69,21 @@ class PRAgent:
|
|||||||
args = update_settings_from_args(args)
|
args = update_settings_from_args(args)
|
||||||
|
|
||||||
action = action.lstrip("/").lower()
|
action = action.lstrip("/").lower()
|
||||||
if action == "reflect_and_review":
|
with get_logger().contextualize(command=action):
|
||||||
get_settings().pr_reviewer.ask_and_reflect = True
|
if action == "reflect_and_review":
|
||||||
if action == "answer":
|
get_settings().pr_reviewer.ask_and_reflect = True
|
||||||
if notify:
|
if action == "answer":
|
||||||
notify()
|
if notify:
|
||||||
await PRReviewer(pr_url, is_answer=True, args=args, ai_handler=self.ai_handler).run()
|
notify()
|
||||||
elif action == "auto_review":
|
await PRReviewer(pr_url, is_answer=True, args=args, ai_handler=self.ai_handler).run()
|
||||||
await PRReviewer(pr_url, is_auto=True, args=args, ai_handler=self.ai_handler).run()
|
elif action == "auto_review":
|
||||||
elif action in command2class:
|
await PRReviewer(pr_url, is_auto=True, args=args, ai_handler=self.ai_handler).run()
|
||||||
if notify:
|
elif action in command2class:
|
||||||
notify()
|
if notify:
|
||||||
|
notify()
|
||||||
await command2class[action](pr_url, ai_handler=self.ai_handler, args=args).run()
|
|
||||||
else:
|
await command2class[action](pr_url, ai_handler=self.ai_handler, args=args).run()
|
||||||
return False
|
else:
|
||||||
return True
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user