From 76f44b13f8d23ba2edc1b5008113f5a810fd0511 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sat, 27 Jan 2024 21:20:10 +0200 Subject: [PATCH 1/3] docs: Update GitHub app configurations section in Usage.md --- Usage.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Usage.md b/Usage.md index efb4dcb6..4593c925 100644 --- a/Usage.md +++ b/Usage.md @@ -142,8 +142,7 @@ num_code_suggestions=1 Then you will overwrite the default number of code suggestions to 1. #### GitHub app automatic tools -The [github_app](pr_agent/settings/configuration.toml#L76) section defines GitHub app-specific configurations. -In this section, you can define configurations to control the conditions for which tools will **run automatically**. +The [github_app](pr_agent/settings/configuration.toml#L108) section defines GitHub app specific configurations. ##### GitHub app automatic tools for PR actions The configuration parameter `pr_commands` defines the list of tools that will be **run automatically** when a new PR is opened. @@ -222,7 +221,7 @@ Specifically, start by setting the following environment variables: github_action_config.auto_improve: "false" # enable\disable auto improve ``` `github_action_config.auto_review`, `github_action_config.auto_describe` and `github_action_config.auto_improve` are used to enable/disable automatic tools that run when a new PR is opened. -If not set, the default option is that only the `review` tool will run automatically when a new PR is opened. +If not set, the default option is that all three tools will run automatically when a new PR is opened. Note that you can give additional config parameters by adding environment variables to `.github/workflows/pr_agent.yml`, or by using a `.pr_agent.toml` file in the root of your repo, similar to the GitHub App usage. From 98ce0a70361475fa5567e1a657e44123a8e8de43 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sat, 27 Jan 2024 21:25:43 +0200 Subject: [PATCH 2/3] s --- pr_agent/servers/help.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pr_agent/servers/help.py b/pr_agent/servers/help.py index 376475fe..1d48be59 100644 --- a/pr_agent/servers/help.py +++ b/pr_agent/servers/help.py @@ -48,7 +48,7 @@ Examples for extra instructions: ``` [pr_reviewer] # /review # extra_instructions=""" -In the code feedback section, emphasize the following: +In the 'general suggestions' section, emphasize the following: - Does the code logic cover relevant edge cases? - Is the code logic clear and easy to understand? - Is the code logic efficient? @@ -71,14 +71,14 @@ Edit this field to enable/disable the tool, or to change the used configurations """ output += "\n\n\n\n" - # code feedback - output += "
About the 'Code feedback' section
\n\n" - output+="""\ -The `review` tool provides several type of feedbacks, one of them is code suggestions. -If you are interested **only** in the code suggestions, it is recommended to use the [`improve`](https://github.com/Codium-ai/pr-agent/blob/main/docs/IMPROVE.md) feature instead, since it dedicated only to code suggestions, and usually gives better results. -Use the `review` tool if you want to get a more comprehensive feedback, which includes code suggestions as well. -""" - output += "\n\n
\n\n" +# # code feedback +# output += "
About the 'Code feedback' section
\n\n" +# output+="""\ +# The `review` tool provides several type of feedbacks, one of them is code suggestions. +# If you are interested **only** in the code suggestions, it is recommended to use the [`improve`](https://github.com/Codium-ai/pr-agent/blob/main/docs/IMPROVE.md) feature instead, since it dedicated only to code suggestions, and usually gives better results. +# Use the `review` tool if you want to get a more comprehensive feedback, which includes code suggestions as well. +# """ +# output += "\n\n
\n\n" # auto-labels output += "
Auto-labels
\n\n" @@ -309,8 +309,9 @@ Use triple quotes to write multi-line instructions. Use bullet points to make th output += """\ - While the current AI for code is getting better and better (GPT-4), it's not flawless. Not all the suggestions will be perfect, and a user should not accept all of them automatically. - Suggestions are not meant to be simplistic. Instead, they aim to give deep feedback and raise questions, ideas and thoughts to the user, who can then use his judgment, experience, and understanding of the code base. -- Recommended to use the 'extra_instructions' field to guide the model to suggestions that are more relevant to the specific needs of the project. -- Best quality will be obtained by using 'improve --extended' mode. +- Recommended to use the 'extra_instructions' field to guide the model to suggestions that are more relevant to the specific needs of the project, or use the [custom suggestions :gem:](https://github.com/Codium-ai/pr-agent/blob/main/docs/CUSTOM_SUGGESTIONS.md) tool +- With large PRs, best quality will be obtained by using 'improve --extended' mode. + """ output += "\n\n
\n\n"\ From ecb46435b3487a897d96462992f5fc88afb78c9a Mon Sep 17 00:00:00 2001 From: mrT23 Date: Sat, 27 Jan 2024 21:29:19 +0200 Subject: [PATCH 3/3] s --- Usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Usage.md b/Usage.md index 4593c925..08ab0119 100644 --- a/Usage.md +++ b/Usage.md @@ -221,7 +221,7 @@ Specifically, start by setting the following environment variables: github_action_config.auto_improve: "false" # enable\disable auto improve ``` `github_action_config.auto_review`, `github_action_config.auto_describe` and `github_action_config.auto_improve` are used to enable/disable automatic tools that run when a new PR is opened. -If not set, the default option is that all three tools will run automatically when a new PR is opened. +If not set, the default configuration is for all three tools to run automatically when a new PR is opened. Note that you can give additional config parameters by adding environment variables to `.github/workflows/pr_agent.yml`, or by using a `.pr_agent.toml` file in the root of your repo, similar to the GitHub App usage.