reflect and review + protections

This commit is contained in:
mrT23
2023-07-18 08:22:25 +03:00
parent 4c29ff2db1
commit 51e08c3c2b
6 changed files with 20 additions and 12 deletions

View File

@ -15,8 +15,8 @@ class PRAgent:
async def handle_request(self, pr_url, request) -> bool:
if any(cmd in request for cmd in ["/answer"]):
await PRReviewer(pr_url, is_answer=True).review()
elif any(cmd in request for cmd in ["/review", "/review_pr"]):
if settings.pr_reviewer.ask_and_reflect:
elif any(cmd in request for cmd in ["/review", "/review_pr", "/reflect_and_review"]):
if settings.pr_reviewer.ask_and_reflect or any(cmd in request for cmd in ["/reflect_and_review"]):
await PRInformationFromUser(pr_url).generate_questions()
else:
await PRReviewer(pr_url).review()