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

@ -56,8 +56,9 @@ async def run_action():
body = comment_body.strip().lower()
if any(cmd in body for cmd in ["/answer"]):
await PRReviewer(pr_url, is_answer=True).review()
elif any(cmd in body for cmd in ["/review", "/review_pr", "/answer"]):
if settings.pr_reviewer.ask_and_reflect:
elif any(cmd in body for cmd in ["/review", "/review_pr", "/reflect_and_review"]):
if settings.pr_reviewer.ask_and_reflect or \
any(cmd in body for cmd in ["/reflect_and_review"]):
await PRInformationFromUser(pr_url).generate_questions()
else:
await PRReviewer(pr_url).review()