Skip to content

Commit f3ee4a7

Browse files
committed
docs: simplify default tool configurations and update documentation
1 parent a768969 commit f3ee4a7

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

docs/docs/usage-guide/automations_and_usage.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,37 +101,41 @@ When this parameter is set to `true`, Qodo Merge will not run any automatic tool
101101

102102
#### GitHub app automatic tools when a new PR is opened
103103

104-
The [github_app](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L108) section defines GitHub app specific configurations.
104+
The [github_app](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L220) section defines GitHub app specific configurations.
105105

106-
The configuration parameter `pr_commands` defines the list of tools that will be **run automatically** when a new PR is opened.
106+
The configuration parameter `pr_commands` defines the list of tools that will be **run automatically** when a new PR is opened:
107107
```toml
108108
[github_app]
109109
pr_commands = [
110110
"/describe",
111111
"/review",
112-
"/improve --pr_code_suggestions.suggestions_score_threshold=5",
112+
"/improve",
113113
]
114114
```
115115

116116
This means that when a new PR is opened/reopened or marked as ready for review, Qodo Merge will run the `describe`, `review` and `improve` tools.
117-
For the `improve` tool, for example, the `suggestions_score_threshold` parameter will be set to 5 (suggestions below a score of 5 won't be presented)
118117

119118
You can override the default tool parameters by using one the three options for a [configuration file](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/): **wiki**, **local**, or **global**.
120-
For example, if your local `.pr_agent.toml` file contains:
119+
For example, if your configuration file contains:
120+
121121
```toml
122122
[pr_description]
123123
generate_ai_title = true
124124
```
125-
Every time you run the `describe` tool, including automatic runs, the PR title will be generated by the AI.
126125

127-
To change which tools will run automatically when a new PR is opened, you can set the `pr_commands` parameter in the configuration file.
126+
Every time you run the `describe` tool (including automatic runs) the PR title will be generated by the AI.
127+
128+
You can customize configurations specifically for automated runs by using the `--config_path=<value>` parameter.
129+
For instance, to modify the `review` tool settings only for newly opened PRs, use:
128130
```toml
129131
[github_app]
130-
pr_commands = ["describe", "review"]
132+
pr_commands = [
133+
"/describe",
134+
"/review --pr_reviewer.extra_instructions='focus on the file: ...'",
135+
"/improve",
136+
]
131137
```
132138

133-
In this case, only the `describe` and `review` tools will run automatically when a new PR is opened.
134-
135139
#### GitHub app automatic tools for push actions (commits to an open PR)
136140

137141
In addition to running automatic tools when a PR is opened, the GitHub app can also respond to new code that is pushed to an open PR.

pr_agent/settings/configuration.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ override_deployment_type = true
219219
handle_pr_actions = ['opened', 'reopened', 'ready_for_review']
220220
pr_commands = [
221221
"/describe --pr_description.final_update_message=false",
222-
"/review --pr_reviewer.num_code_suggestions=0",
222+
"/review",
223223
"/improve",
224224
]
225225
# settings for "pull_request" event with "synchronize" action - used to detect and handle push triggers for new commits
@@ -231,27 +231,27 @@ push_trigger_pending_tasks_backlog = true
231231
push_trigger_pending_tasks_ttl = 300
232232
push_commands = [
233233
"/describe",
234-
"/review --pr_reviewer.num_code_suggestions=0",
234+
"/review",
235235
]
236236

237237
[gitlab]
238238
url = "https://gitlab.com"
239239
pr_commands = [
240240
"/describe --pr_description.final_update_message=false",
241-
"/review --pr_reviewer.num_code_suggestions=0",
241+
"/review",
242242
"/improve",
243243
]
244244
handle_push_trigger = false
245245
push_commands = [
246246
"/describe",
247-
"/review --pr_reviewer.num_code_suggestions=0",
247+
"/review",
248248
]
249249

250250
[bitbucket_app]
251251
pr_commands = [
252252
"/describe --pr_description.final_update_message=false",
253-
"/review --pr_reviewer.num_code_suggestions=0",
254-
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
253+
"/review",
254+
"/improve --pr_code_suggestions.commitable_code_suggestions=true",
255255
]
256256
avoid_full_files = false
257257

@@ -276,8 +276,8 @@ avoid_full_files = false
276276
url = ""
277277
pr_commands = [
278278
"/describe --pr_description.final_update_message=false",
279-
"/review --pr_reviewer.num_code_suggestions=0",
280-
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
279+
"/review",
280+
"/improve --pr_code_suggestions.commitable_code_suggestions=true",
281281
]
282282

283283
[litellm]

0 commit comments

Comments
 (0)