mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-06 05:40:38 +08:00
docs: simplify default tool configurations and update documentation
This commit is contained in:
@ -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
|
#### 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
|
```toml
|
||||||
[github_app]
|
[github_app]
|
||||||
pr_commands = [
|
pr_commands = [
|
||||||
"/describe",
|
"/describe",
|
||||||
"/review",
|
"/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.
|
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**.
|
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
|
```toml
|
||||||
[pr_description]
|
[pr_description]
|
||||||
generate_ai_title = true
|
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
|
```toml
|
||||||
[github_app]
|
[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)
|
#### 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.
|
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.
|
||||||
|
@ -219,7 +219,7 @@ override_deployment_type = true
|
|||||||
handle_pr_actions = ['opened', 'reopened', 'ready_for_review']
|
handle_pr_actions = ['opened', 'reopened', 'ready_for_review']
|
||||||
pr_commands = [
|
pr_commands = [
|
||||||
"/describe --pr_description.final_update_message=false",
|
"/describe --pr_description.final_update_message=false",
|
||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review",
|
||||||
"/improve",
|
"/improve",
|
||||||
]
|
]
|
||||||
# settings for "pull_request" event with "synchronize" action - used to detect and handle push triggers for new commits
|
# 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_trigger_pending_tasks_ttl = 300
|
||||||
push_commands = [
|
push_commands = [
|
||||||
"/describe",
|
"/describe",
|
||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review",
|
||||||
]
|
]
|
||||||
|
|
||||||
[gitlab]
|
[gitlab]
|
||||||
url = "https://gitlab.com"
|
url = "https://gitlab.com"
|
||||||
pr_commands = [
|
pr_commands = [
|
||||||
"/describe --pr_description.final_update_message=false",
|
"/describe --pr_description.final_update_message=false",
|
||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review",
|
||||||
"/improve",
|
"/improve",
|
||||||
]
|
]
|
||||||
handle_push_trigger = false
|
handle_push_trigger = false
|
||||||
push_commands = [
|
push_commands = [
|
||||||
"/describe",
|
"/describe",
|
||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review",
|
||||||
]
|
]
|
||||||
|
|
||||||
[bitbucket_app]
|
[bitbucket_app]
|
||||||
pr_commands = [
|
pr_commands = [
|
||||||
"/describe --pr_description.final_update_message=false",
|
"/describe --pr_description.final_update_message=false",
|
||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review",
|
||||||
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
|
"/improve --pr_code_suggestions.commitable_code_suggestions=true",
|
||||||
]
|
]
|
||||||
avoid_full_files = false
|
avoid_full_files = false
|
||||||
|
|
||||||
@ -276,8 +276,8 @@ avoid_full_files = false
|
|||||||
url = ""
|
url = ""
|
||||||
pr_commands = [
|
pr_commands = [
|
||||||
"/describe --pr_description.final_update_message=false",
|
"/describe --pr_description.final_update_message=false",
|
||||||
"/review --pr_reviewer.num_code_suggestions=0",
|
"/review",
|
||||||
"/improve --pr_code_suggestions.commitable_code_suggestions=true --pr_code_suggestions.suggestions_score_threshold=7",
|
"/improve --pr_code_suggestions.commitable_code_suggestions=true",
|
||||||
]
|
]
|
||||||
|
|
||||||
[litellm]
|
[litellm]
|
||||||
|
Reference in New Issue
Block a user