docs: simplify default tool configurations and update documentation

This commit is contained in:
mrT23
2024-12-19 09:33:20 +02:00
parent a768969d37
commit f3ee4a75b5
2 changed files with 22 additions and 18 deletions

View File

@ -101,37 +101,41 @@ When this parameter is set to `true`, Qodo Merge will not run any automatic tool
#### GitHub app automatic tools when a new PR is opened
The [github_app](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L108) section defines GitHub app specific configurations.
The [github_app](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L220) section defines GitHub app specific configurations.
The configuration parameter `pr_commands` defines the list of tools that will be **run automatically** when a new PR is opened.
The configuration parameter `pr_commands` defines the list of tools that will be **run automatically** when a new PR is opened:
```toml
[github_app]
pr_commands = [
"/describe",
"/review",
"/improve --pr_code_suggestions.suggestions_score_threshold=5",
"/improve",
]
```
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.
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)
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**.
For example, if your local `.pr_agent.toml` file contains:
For example, if your configuration file contains:
```toml
[pr_description]
generate_ai_title = true
```
Every time you run the `describe` tool, including automatic runs, the PR title will be generated by the AI.
To change which tools will run automatically when a new PR is opened, you can set the `pr_commands` parameter in the configuration file.
Every time you run the `describe` tool (including automatic runs) the PR title will be generated by the AI.
You can customize configurations specifically for automated runs by using the `--config_path=<value>` parameter.
For instance, to modify the `review` tool settings only for newly opened PRs, use:
```toml
[github_app]
pr_commands = ["describe", "review"]
pr_commands = [
"/describe",
"/review --pr_reviewer.extra_instructions='focus on the file: ...'",
"/improve",
]
```
In this case, only the `describe` and `review` tools will run automatically when a new PR is opened.
#### GitHub app automatic tools for push actions (commits to an open PR)
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.

View File

@ -219,7 +219,7 @@ override_deployment_type = true
handle_pr_actions = ['opened', 'reopened', 'ready_for_review']
pr_commands = [
"/describe --pr_description.final_update_message=false",
"/review --pr_reviewer.num_code_suggestions=0",
"/review",
"/improve",
]
# 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
push_trigger_pending_tasks_ttl = 300
push_commands = [
"/describe",
"/review --pr_reviewer.num_code_suggestions=0",
"/review",
]
[gitlab]
url = "https://gitlab.com"
pr_commands = [
"/describe --pr_description.final_update_message=false",
"/review --pr_reviewer.num_code_suggestions=0",
"/review",
"/improve",
]
handle_push_trigger = false
push_commands = [
"/describe",
"/review --pr_reviewer.num_code_suggestions=0",
"/review",
]
[bitbucket_app]
pr_commands = [
"/describe --pr_description.final_update_message=false",
"/review --pr_reviewer.num_code_suggestions=0",
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
"/review",
"/improve --pr_code_suggestions.commitable_code_suggestions=true",
]
avoid_full_files = false
@ -276,8 +276,8 @@ avoid_full_files = false
url = ""
pr_commands = [
"/describe --pr_description.final_update_message=false",
"/review --pr_reviewer.num_code_suggestions=0",
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
"/review",
"/improve --pr_code_suggestions.commitable_code_suggestions=true",
]
[litellm]