Don't commment on Github, only eyes reaction

This commit is contained in:
Ori Kotek
2023-08-07 18:09:39 +03:00
parent b1148e5f7a
commit ebbe655c40
4 changed files with 10 additions and 7 deletions

View File

@ -37,7 +37,7 @@ class PRAgent:
def __init__(self):
pass
async def handle_request(self, pr_url, request) -> bool:
async def handle_request(self, pr_url, request, notify=None) -> bool:
# First, apply repo specific settings if exists
if get_settings().config.use_repo_settings_file:
repo_settings_file = None
@ -67,8 +67,12 @@ class PRAgent:
if action == "reflect_and_review" and not get_settings().pr_reviewer.ask_and_reflect:
action = "review"
if action == "answer":
if notify:
notify()
await PRReviewer(pr_url, is_answer=True, args=args).run()
elif action in command2class:
if notify:
notify()
await command2class[action](pr_url, args=args).run()
else:
return False