Don't add "How to use" when running from the command line - a small correction

This commit is contained in:
Ori Kotek
2023-07-06 17:53:52 +03:00
parent d04c0f490c
commit 4331610e01

View File

@ -92,18 +92,19 @@ class PRReviewer:
markdown_text = convert_to_markdown(data) markdown_text = convert_to_markdown(data)
user = self.git_provider.get_user_id() user = self.git_provider.get_user_id()
markdown_text += "\n### How to use\n"
if self.cli_mode: if not self.cli_mode:
pass markdown_text += "\n### How to use\n"
elif user and '[bot]' not in user: if 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 += "\n### How to use\n"
markdown_text += "> You can also tag me and ask any question, " \ markdown_text += f"> Tag me in a comment '@{user}' to ask for a new review after you update the PR.\n"
f"for example '@{user} is the PR ready for merge?'" markdown_text += "> You can also tag me and ask any question, " \
else: f"for example '@{user} is the PR ready for merge?'"
markdown_text += "> Add a comment that says 'review' to ask for a new review " \ else:
"after you update the PR.\n" markdown_text += "> Add a comment that says 'review' to ask for a new review " \
markdown_text += "> You can also add a comment that says 'answer QUESTION', " \ "after you update the PR.\n"
"for example 'answer is the PR ready for merge?'" 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: if settings.config.verbosity_level >= 2:
logging.info(f"Markdown response:\n{markdown_text}") logging.info(f"Markdown response:\n{markdown_text}")