From 2531849b736389289edd0565d7302e5c3b437a88 Mon Sep 17 00:00:00 2001 From: Ori Kotek Date: Sun, 16 Jul 2023 13:45:20 +0300 Subject: [PATCH] Update usage instructions in PR comment --- pr_agent/tools/pr_reviewer.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pr_agent/tools/pr_reviewer.py b/pr_agent/tools/pr_reviewer.py index e6d001e1..109a9b74 100644 --- a/pr_agent/tools/pr_reviewer.py +++ b/pr_agent/tools/pr_reviewer.py @@ -96,15 +96,18 @@ class PRReviewer: if not self.cli_mode: markdown_text += "\n### How to use\n" + commands_text = "> /review or /review_pr - Ask for a new review after your update the PR\n" \ + "> /describe or /describe_pr - Modify the PR title and description based " \ + "on the PR's contents.\n" \ + "> /improve or /improve_code - Suggest improvements to the code in the PR as pull " \ + "request comments ready to commit.\n" \ + "> /ask /ask_question - Ask a question about the PR.\n" 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 += "> You can also tag me and ask any question, " \ - f"for example '@{user} is the PR ready for merge?'" + markdown_text += f"> Tag me in a comment '@{user}' and add one of the following commands:\n" + \ + commands_text 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?'" + markdown_text += "> Add a comment to to invoke PR-Agent, use one of the following commands:\n" + \ + commands_text if settings.config.verbosity_level >= 2: logging.info(f"Markdown response:\n{markdown_text}")