mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-07 22:30:38 +08:00
similar issue
This commit is contained in:
@ -17,7 +17,7 @@ Making pull requests less painful with an AI agent
|
||||
|
||||
CodiumAI `PR-Agent` is an open-source tool aiming to help developers review pull requests faster and more efficiently. It automatically analyzes the pull request and can provide several types of commands:
|
||||
|
||||
‣ **Auto Description (`/describe`)**: Automatically generating [PR description](./docs/DESCRIBE.md) - title, type, summary, code walkthrough and labels.
|
||||
‣ **Auto Description [(`/describe`)](./docs/DESCRIBE.md)**: Automatically generating PR description - title, type, summary, code walkthrough and labels.
|
||||
\
|
||||
‣ **Auto Review (`/review`)**: [Adjustable feedback](https://github.com/Codium-ai/pr-agent/pull/229#issuecomment-1695022908) about the PR main theme, type, relevant tests, security issues, score, and various suggestions for the PR content.
|
||||
\
|
||||
@ -27,7 +27,7 @@ CodiumAI `PR-Agent` is an open-source tool aiming to help developers review pull
|
||||
\
|
||||
‣ **Update Changelog (`/update_changelog`)**: Automatically updating the CHANGELOG.md file with the [PR changes](https://github.com/Codium-ai/pr-agent/pull/168#discussion_r1282077645).
|
||||
\
|
||||
‣ **Find similar issue (`/similar_issue`)**: Automatically retrieves and presents [similar issues](https://github.com/Alibaba-MIIL/ASL/issues/107).
|
||||
‣ **Find similar issue [(`/similar_issue`)](./docs/SIMILAR_ISSUE.md)**: Automatically retrieves and presents similar issues
|
||||
|
||||
|
||||
See the [usage guide](./Usage.md) for instructions how to run the different tools from [CLI](./Usage.md#working-from-a-local-repo-cli), or by [online usage](./Usage.md#online-usage), as well as additional details on optional commands and configurations.
|
||||
|
22
Usage.md
22
Usage.md
@ -262,25 +262,3 @@ And use the following settings (you have to replace the values) in .secrets.toml
|
||||
org = "https://dev.azure.com/YOUR_ORGANIZATION/"
|
||||
pat = "YOUR_PAT_TOKEN"
|
||||
```
|
||||
|
||||
#### Similar issue tool
|
||||
|
||||
[Example usage](https://github.com/Alibaba-MIIL/ASL/issues/107)
|
||||
|
||||
<img src=./pics/similar_issue_tool.png width="768">
|
||||
|
||||
To enable usage of the '**similar issue**' tool, you need to set the following keys in `.secrets.toml` (or in the relevant environment variables):
|
||||
```
|
||||
[pinecone]
|
||||
api_key = "..."
|
||||
environment = "..."
|
||||
```
|
||||
These parameters can be obtained by registering to [Pinecone](https://app.pinecone.io/?sessionType=signup/).
|
||||
|
||||
- To invoke the 'similar issue' tool from **CLI**, run:
|
||||
`python3 cli.py --issue_url=... similar_issue`
|
||||
|
||||
- To invoke the 'similar' issue tool via online usage, [comment](https://github.com/Codium-ai/pr-agent/issues/178#issuecomment-1716934893) on a PR:
|
||||
`/similar_issue`
|
||||
|
||||
- You can also enable the 'similar issue' tool to run automatically when a new issue is opened, by adding it to the [pr_commands list in the github_app section](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L66)
|
||||
|
@ -1,4 +1,4 @@
|
||||
## Describe
|
||||
# Describe Tool
|
||||
|
||||
The `describe` tool scans the PR code changes, and automatically generates PR description - title, type, summary, code walkthrough and labels.
|
||||
It can ba invoked manually by commenting on any PR:
|
||||
@ -15,7 +15,7 @@ The `describe` tool can also be triggered automatically every time a new PR is o
|
||||
|
||||
### Configuration options
|
||||
|
||||
Under the section 'pr_description', the [configuration file](pr_agent/settings/configuration.toml) contains options to customize the 'describe' tool:
|
||||
Under the section 'pr_description', the [configuration file](./../pr_agent/settings/configuration.toml) contains options to customize the 'describe' tool:
|
||||
|
||||
- `publish_labels`: if set to true, the tool will publish the labels to the PR. Default is true.
|
||||
|
||||
|
29
docs/SIMILAR_ISSUE.md
Normal file
29
docs/SIMILAR_ISSUE.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Similar Issue Tool
|
||||
The similar issue tool retrieves the most similar issues to the current issue:
|
||||
```
|
||||
/similar issue
|
||||
```
|
||||
|
||||
<img src=./../pics/similar_issue_original_issue.png width="768">
|
||||
<img src=./../pics/similar_issue_comment.png width="768">
|
||||
<img src=./../pics/similar_issue.png width="768">
|
||||
|
||||
Note that to perform retrieval, the `similar_issue` tool indexes all the repo previous issues (once).
|
||||
|
||||
To enable usage of the '**similar issue**' tool, you need to set the following keys in `.secrets.toml` (or in the relevant environment variables):
|
||||
```
|
||||
[pinecone]
|
||||
api_key = "..."
|
||||
environment = "..."
|
||||
```
|
||||
These parameters can be obtained by registering to [Pinecone](https://app.pinecone.io/?sessionType=signup/).
|
||||
|
||||
|
||||
### How to use:
|
||||
- To invoke the 'similar issue' tool from **CLI**, run:
|
||||
`python3 cli.py --issue_url=... similar_issue`
|
||||
|
||||
- To invoke the 'similar' issue tool via online usage, [comment](https://github.com/Codium-ai/pr-agent/issues/178#issuecomment-1716934893) on a PR:
|
||||
`/similar_issue`
|
||||
|
||||
- You can also enable the 'similar issue' tool to run automatically when a new issue is opened, by adding it to the [pr_commands list in the github_app section](https://github.com/Codium-ai/pr-agent/blob/main/pr_agent/settings/configuration.toml#L66)
|
BIN
pics/similar_issue.png
Normal file
BIN
pics/similar_issue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
BIN
pics/similar_issue_comment.png
Normal file
BIN
pics/similar_issue_comment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
pics/similar_issue_original_issue.png
Normal file
BIN
pics/similar_issue_original_issue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 KiB |
Binary file not shown.
Before Width: | Height: | Size: 210 KiB |
Reference in New Issue
Block a user