mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-16 02:30:37 +08:00
Update
This commit is contained in:
@ -13,19 +13,19 @@ For example:
|
|||||||
|
|
||||||
The `describe` tool can also be triggered automatically every time a new PR is opened. See examples for automatic triggers for [GitHub App](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#github-app-automatic-tools) and [GitHub Action](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#working-with-github-action)
|
The `describe` tool can also be triggered automatically every time a new PR is opened. See examples for automatic triggers for [GitHub App](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#github-app-automatic-tools) and [GitHub Action](https://github.com/Codium-ai/pr-agent/blob/main/Usage.md#working-with-github-action)
|
||||||
|
|
||||||
### Git provider's native labels page
|
### Handle custom labels from the Repo's labels page :gem:
|
||||||
> This feature is available only in Pr-Agent Pro :gem:
|
> This feature is available only in PR-Agent Pro
|
||||||
* Github : https://github.com/{owner}/{repo}/labels, or click on the "Labels" tab in the issues or PRs page.
|
* GitHub : `https://github.com/{owner}/{repo}/labels`, or click on the "Labels" tab in the issues or PRs page.
|
||||||
* GitLab : https://gitlab.com/{owner}/{repo}/-/labels, or click on "Manage" -> "Labels" on the left menu.
|
* GitLab : `https://gitlab.com/{owner}/{repo}/-/labels`, or click on "Manage" -> "Labels" on the left menu.
|
||||||
|
|
||||||
b. Add/edit the custom labels. It should be formatted as follows:
|
b. Add/edit the custom labels. It should be formatted as follows:
|
||||||
* Label name: The name of the custom label.
|
* Label name: The name of the custom label.
|
||||||
* Description: Description of with prefix `pr_agent:`, for example: `pr_agent: Description of when AI should suggest this label`.
|
* Description: Start the description of with prefix `pr_agent:`, for example: `pr_agent: Description of when AI should suggest this label`.<br>
|
||||||
<kbd><img src=https://codium.ai/images/pr_agent/add_native_custom_labels.png width="768"></kbd>
|
The description should be comprehensive and detailed, indicating when to add the desired label.
|
||||||
|
<kbd><img src=https://codium.ai/images/pr_agent/add_native_custom_labels.png width="880"></kbd>
|
||||||
c. Now the custom labels will be included in the `generate_labels` tool.
|
c. Now the custom labels will be included in the `generate_labels` tool.
|
||||||
*This feature is supported in GitHub and GitLab.
|
|
||||||
|
|
||||||
|
*This feature is supported in GitHub and GitLab.
|
||||||
|
|
||||||
### Configuration options
|
### Configuration options
|
||||||
|
|
||||||
|
@ -14,29 +14,29 @@ If we wish to add detect changes to SQL queries in a given PR, we can add the fo
|
|||||||
When running the `generate_labels` tool on a PR that includes changes in SQL queries, it will automatically suggest the custom label:
|
When running the `generate_labels` tool on a PR that includes changes in SQL queries, it will automatically suggest the custom label:
|
||||||
<kbd><img src=https://codium.ai/images/pr_agent/custom_label_published.png width="768"></kbd>
|
<kbd><img src=https://codium.ai/images/pr_agent/custom_label_published.png width="768"></kbd>
|
||||||
|
|
||||||
|
Note that in addition to the dedicated tool `generate_labels`, the custom labels will also be used by the `describe` tool.
|
||||||
|
|
||||||
### How to enable custom labels
|
### How to enable custom labels
|
||||||
|
There are 3 ways to enable custom labels:
|
||||||
|
|
||||||
Note that in addition to the dedicated tool `generate_labels`, the custom labels will also be used by the `review` and `describe` tools.
|
#### 1. CLI (local configuration file)
|
||||||
|
When working from CLI, you need to apply the [configuration changes](#configuration-changes) to the [custom_labels file](./../pr_agent/settings/custom_labels.toml):
|
||||||
|
|
||||||
#### 1. CLI
|
#### 2. Repo configuration file
|
||||||
To enable custom labels, you need to apply the [configuration changes](#configuration-changes) to the [custom_labels file](./../pr_agent/settings/custom_labels.toml):
|
|
||||||
|
|
||||||
#### 2. GitHub Action and GitHub App
|
|
||||||
To enable custom labels, you need to apply the [configuration changes](#configuration-changes) to the local `.pr_agent.toml` file in you repository.
|
To enable custom labels, you need to apply the [configuration changes](#configuration-changes) to the local `.pr_agent.toml` file in you repository.
|
||||||
|
|
||||||
#### 3. Git provider's native labels page
|
#### 3. Handle custom labels from the Repo's labels page :gem:
|
||||||
> This feature is available only in Pr-Agent Pro :gem:
|
> This feature is available only in PR-Agent Pro
|
||||||
To enable custom labels, you can add/edit the custom labels in the Git provider's native labels page. For example, in GitHub, you can add/edit the labels in the Labels page:
|
* GitHub : `https://github.com/{owner}/{repo}/labels`, or click on the "Labels" tab in the issues or PRs page.
|
||||||
a. Go to the Labels page:
|
* GitLab : `https://gitlab.com/{owner}/{repo}/-/labels`, or click on "Manage" -> "Labels" on the left menu.
|
||||||
* Github : https://github.com/{owner}/{repo}/labels, or click on the "Labels" tab in the issues or PRs page.
|
|
||||||
* GitLab : https://gitlab.com/{owner}/{repo}/-/labels, or click on "Manage" -> "Labels" on the left menu.
|
|
||||||
|
|
||||||
b. Add/edit the custom labels. It should be formatted as follows:
|
b. Add/edit the custom labels. It should be formatted as follows:
|
||||||
* Label name: The name of the custom label.
|
* Label name: The name of the custom label.
|
||||||
* Description: Description of with prefix `pr_agent:`, for example: `pr_agent: Description of when AI should suggest this label`.
|
* Description: Start the description of with prefix `pr_agent:`, for example: `pr_agent: Description of when AI should suggest this label`.<br>
|
||||||
<kbd><img src=https://codium.ai/images/pr_agent/add_native_custom_labels.png width="768"></kbd>
|
The description should be comprehensive and detailed, indicating when to add the desired label.
|
||||||
|
<kbd><img src=https://codium.ai/images/pr_agent/add_native_custom_labels.png width="880"></kbd>
|
||||||
c. Now the custom labels will be included in the `generate_labels` tool.
|
c. Now the custom labels will be included in the `generate_labels` tool.
|
||||||
|
|
||||||
*This feature is supported in GitHub and GitLab.
|
*This feature is supported in GitHub and GitLab.
|
||||||
|
|
||||||
#### Configuration changes
|
#### Configuration changes
|
||||||
|
Reference in New Issue
Block a user