mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 04:10:49 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@ -57,6 +57,14 @@ For example, if you want to edit the `review` tool configurations, you can run:
|
||||
```
|
||||
Any configuration value in [configuration file](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml) file can be similarly edited. Comment `/config` to see the list of available configurations.
|
||||
|
||||
## Disabling automatic feedback
|
||||
|
||||
To easily disable all automatic feedback from Qodo Merge (GitHub App, GitLab Webhook, BitBucket App, Azure DevOps Webhook), set in a configuration file:
|
||||
|
||||
```toml
|
||||
[config]
|
||||
disable_auto_feedback = true
|
||||
```
|
||||
|
||||
## GitHub App
|
||||
|
||||
@ -69,7 +77,7 @@ Any configuration value in [configuration file](https://github.com/Codium-ai/pr-
|
||||
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 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",
|
||||
@ -83,25 +91,27 @@ For the `improve` tool, for example, the `suggestions_score_threshold` parameter
|
||||
|
||||
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:
|
||||
```
|
||||
```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 cancel the automatic run of all the tools, set:
|
||||
```
|
||||
To change which tools will run automatically when a new PR is opened, you can set the `pr_commands` parameter in the configuration file.
|
||||
```toml
|
||||
[github_app]
|
||||
pr_commands = []
|
||||
pr_commands = ["describe", "review"]
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
The configuration toggle `handle_push_trigger` can be used to enable this feature.
|
||||
The configuration parameter `push_commands` defines the list of tools that will be **run automatically** when new code is pushed to the PR.
|
||||
```
|
||||
```toml
|
||||
[github_app]
|
||||
handle_push_trigger = true
|
||||
push_commands = [
|
||||
@ -137,15 +147,18 @@ The JSON structure is equivalent to the yaml data structure defined in [pr_revie
|
||||
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` [configuration file](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/#global-configuration-file) in the root of your repo
|
||||
|
||||
For example, you can set an environment variable: `pr_description.publish_labels=false`, or add a `.pr_agent.toml` file with the following content:
|
||||
```
|
||||
|
||||
```toml
|
||||
[pr_description]
|
||||
publish_labels = false
|
||||
```
|
||||
|
||||
to prevent Qodo Merge from publishing labels when running the `describe` tool.
|
||||
|
||||
## GitLab Webhook
|
||||
After setting up a GitLab webhook, to control which commands will run automatically when a new MR is opened, you can set the `pr_commands` parameter in the configuration file, similar to the GitHub App:
|
||||
```
|
||||
|
||||
```toml
|
||||
[gitlab]
|
||||
pr_commands = [
|
||||
"/describe",
|
||||
@ -157,7 +170,7 @@ pr_commands = [
|
||||
the GitLab webhook can also respond to new code that is pushed to an open MR.
|
||||
The configuration toggle `handle_push_trigger` can be used to enable this feature.
|
||||
The configuration parameter `push_commands` defines the list of tools that will be **run automatically** when new code is pushed to the MR.
|
||||
```
|
||||
```toml
|
||||
[gitlab]
|
||||
handle_push_trigger = true
|
||||
push_commands = [
|
||||
@ -174,7 +187,7 @@ Similar to GitHub app, when running Qodo Merge from BitBucket App, the default [
|
||||
By uploading a local `.pr_agent.toml` file to the root of the repo's main branch, you can edit and customize any configuration parameter. Note that you need to upload `.pr_agent.toml` prior to creating a PR, in order for the configuration to take effect.
|
||||
|
||||
For example, if your local `.pr_agent.toml` file contains:
|
||||
```
|
||||
```toml
|
||||
[pr_reviewer]
|
||||
extra_instructions = "Answer in japanese"
|
||||
```
|
||||
@ -192,7 +205,7 @@ This will prevent Qodo Merge from acquiring the full file content, and will only
|
||||
To control which commands will run automatically when a new PR is opened, you can set the `pr_commands` parameter in the configuration file:
|
||||
Specifically, set the following values:
|
||||
|
||||
```
|
||||
```toml
|
||||
[bitbucket_app]
|
||||
pr_commands = [
|
||||
"/review",
|
||||
@ -203,7 +216,7 @@ Note that we set specifically for bitbucket, we recommend using: `--pr_code_sugg
|
||||
Since this platform only supports inline code suggestions, we want to limit the number of suggestions, and only present a limited number.
|
||||
|
||||
To enable BitBucket app to respond to each **push** to the PR, set (for example):
|
||||
```
|
||||
```toml
|
||||
[bitbucket_app]
|
||||
handle_push_trigger = true
|
||||
push_commands = [
|
||||
@ -215,7 +228,7 @@ push_commands = [
|
||||
## Azure DevOps provider
|
||||
|
||||
To use Azure DevOps provider use the following settings in configuration.toml:
|
||||
```
|
||||
```toml
|
||||
[config]
|
||||
git_provider="azure"
|
||||
```
|
||||
@ -237,7 +250,7 @@ org = "https://dev.azure.com/YOUR_ORGANIZATION/"
|
||||
### Azure DevOps Webhook
|
||||
|
||||
To control which commands will run automatically when a new PR is opened, you can set the `pr_commands` parameter in the configuration file, similar to the GitHub App:
|
||||
```
|
||||
```toml
|
||||
[azure_devops_server]
|
||||
pr_commands = [
|
||||
"/describe",
|
||||
|
Reference in New Issue
Block a user