From 4331610e0135ebeef1471181cbf44ac6e7fc9fc5 Mon Sep 17 00:00:00 2001 From: Ori Kotek Date: Thu, 6 Jul 2023 17:53:52 +0300 Subject: [PATCH] Don't add "How to use" when running from the command line - a small correction --- pr_agent/tools/pr_reviewer.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/pr_agent/tools/pr_reviewer.py b/pr_agent/tools/pr_reviewer.py index 33dd0162..e88af62a 100644 --- a/pr_agent/tools/pr_reviewer.py +++ b/pr_agent/tools/pr_reviewer.py @@ -92,18 +92,19 @@ class PRReviewer: markdown_text = convert_to_markdown(data) user = self.git_provider.get_user_id() - markdown_text += "\n### How to use\n" - if self.cli_mode: - pass - elif user and '[bot]' not in user: - markdown_text += f"> Tag me in a comment '@{user}' to ask for a new review after you update the PR.\n" - markdown_text += "> You can also tag me and ask any question, " \ - f"for example '@{user} is the PR ready for merge?'" - else: - markdown_text += "> Add a comment that says 'review' to ask for a new review " \ - "after you update the PR.\n" - markdown_text += "> You can also add a comment that says 'answer QUESTION', " \ - "for example 'answer is the PR ready for merge?'" + + if not self.cli_mode: + markdown_text += "\n### How to use\n" + if user and '[bot]' not in user: + markdown_text += "\n### How to use\n" + markdown_text += f"> Tag me in a comment '@{user}' to ask for a new review after you update the PR.\n" + markdown_text += "> You can also tag me and ask any question, " \ + f"for example '@{user} is the PR ready for merge?'" + else: + markdown_text += "> Add a comment that says 'review' to ask for a new review " \ + "after you update the PR.\n" + markdown_text += "> You can also add a comment that says 'answer QUESTION', " \ + "for example 'answer is the PR ready for merge?'" if settings.config.verbosity_level >= 2: logging.info(f"Markdown response:\n{markdown_text}")