diff --git a/INSTALL.md b/INSTALL.md index 991ca2b3..13a84462 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -101,6 +101,7 @@ python3 -m pr_agent.cli --pr_url ask python3 -m pr_agent.cli --pr_url describe python3 -m pr_agent.cli --pr_url improve python3 -m pr_agent.cli --pr_url add_docs +python3 -m pr_agent.cli --pr_url generate_labels python3 -m pr_agent.cli --issue_url similar_issue ... ``` diff --git a/pr_agent/servers/help.py b/pr_agent/servers/help.py index 0f3f3caa..cf634224 100644 --- a/pr_agent/servers/help.py +++ b/pr_agent/servers/help.py @@ -1,12 +1,14 @@ -commands_text = "> **/review [-i]**: Request a review of your Pull Request. For an incremental review, which only " \ - "considers changes since the last review, include the '-i' option.\n" \ - "> **/describe**: Modify the PR title and description based on the contents of the PR.\n" \ - "> **/improve [--extended]**: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback. \n" \ - "> **/ask \\**: Pose a question about the PR.\n" \ - "> **/update_changelog**: Update the changelog based on the PR's contents.\n\n" \ - ">To edit any configuration parameter from **configuration.toml**, add --config_path=new_value\n" \ +commands_text = "> **/review**: Request a review of your Pull Request.\n" \ + "> **/describe**: Update the PR title and description based on the contents of the PR.\n" \ + "> **/improve [--extended]**: Suggest improvements to the code in the PR. Extended mode provides a more thorough feedback.\n" \ + "> **/ask \\**: Ask a question about the PR.\n" \ + "> **/update_changelog**: Update the changelog based on the PR's contents.\n" \ + "> **/add_docs**: Generate docstring for new components introduced in the PR.\n" \ + "> **/generate_labels**: Generate labels for the PR based on the PR's contents.\n" \ + "> see the [tools guide](https://github.com/Codium-ai/pr-agent/blob/main/docs/TOOLS_GUIDE.md) for more details.\n\n" \ + ">To edit any configuration parameter from the [configuration.toml](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml), add --config_path=new_value.\n" \ ">For example: /review --pr_reviewer.extra_instructions=\"focus on the file: ...\" \n" \ - ">To list the possible configuration parameters, use the **/config** command.\n" \ + ">To list the possible configuration parameters, add a **/config** comment.\n" \ def bot_help_text(user: str): diff --git a/pr_agent/tools/pr_reviewer.py b/pr_agent/tools/pr_reviewer.py index 525bc128..3f52a28e 100644 --- a/pr_agent/tools/pr_reviewer.py +++ b/pr_agent/tools/pr_reviewer.py @@ -249,11 +249,15 @@ class PRReviewer: # Add help text if not in CLI mode if not get_settings().get("CONFIG.CLI_MODE", False): markdown_text += "\n### How to use\n" + if self.git_provider.is_supported("gfm_markdown"): + markdown_text += "\n**
Instructions**\n" bot_user = "[bot]" if get_settings().github_app.override_deployment_type else get_settings().github_app.bot_user if user and bot_user not in user: markdown_text += bot_help_text(user) else: markdown_text += actions_help_text + if self.git_provider.is_supported("gfm_markdown"): + markdown_text += "\n
\n" # Add custom labels from the review prediction (effort, security) self.set_review_labels(data)