mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-06 05:40:38 +08:00
Update improve.md with enhanced self-review configuration details
This commit is contained in:
@ -86,28 +86,37 @@ code_suggestions_self_review_text = "... (your text here) ..."
|
|||||||
{width=512}
|
{width=512}
|
||||||
|
|
||||||
|
|
||||||
💎 In addition, by setting:
|
|
||||||
|
|
||||||
|
!!! tip "Tip - demanding self-review from the PR author 💎"
|
||||||
|
|
||||||
|
By setting:
|
||||||
```
|
```
|
||||||
[pr_code_suggestions]
|
[pr_code_suggestions]
|
||||||
approve_pr_on_self_review = true
|
approve_pr_on_self_review = true
|
||||||
```
|
```
|
||||||
the tool can automatically approve the PR when the user checks the self-review checkbox.
|
the tool can automatically add an approval when the PR author clicks the self-review checkbox.
|
||||||
|
|
||||||
!!! tip "Tip - demanding self-review from the PR author"
|
|
||||||
If you set the number of required reviewers for a PR to 2, this effectively means that the PR author must click the self-review checkbox before the PR can be merged (in addition to a human reviewer).
|
- If you set the number of required reviewers for a PR to 2, this effectively means that the PR author must click the self-review checkbox before the PR can be merged (in addition to a human reviewer).
|
||||||
|
|
||||||
{width=512}
|
{width=512}
|
||||||
|
|
||||||
|
- If you keep the number of required reviewers for a PR to 1 and enable this configuration, this effectively means that the PR author can approve the PR by actively clicking the self-review checkbox.
|
||||||
|
|
||||||
|
To prevent unauthorized approvals, this configuration defaults to false, and cannot be altered through online comments; enabling requires a direct update to the configuration file and a commit to the repository. This ensures that utilizing the feature demands a deliberate documented decision by the repository owner.
|
||||||
|
|
||||||
|
|
||||||
### How many code suggestions are generated?
|
### How many code suggestions are generated?
|
||||||
PR-Agent uses a dynamic strategy to generate code suggestions based on the size of the pull request (PR). Here's how it works:
|
PR-Agent uses a dynamic strategy to generate code suggestions based on the size of the pull request (PR). Here's how it works:
|
||||||
|
|
||||||
1. Chunking large PRs:
|
1) Chunking large PRs:
|
||||||
|
|
||||||
- PR-Agent divides large PRs into 'chunks'.
|
- PR-Agent divides large PRs into 'chunks'.
|
||||||
- Each chunk contains up to `pr_code_suggestions.max_context_tokens` tokens (default: 14,000).
|
- Each chunk contains up to `pr_code_suggestions.max_context_tokens` tokens (default: 14,000).
|
||||||
|
|
||||||
|
|
||||||
2. Generating suggestions:
|
2) Generating suggestions:
|
||||||
|
|
||||||
- For each chunk, PR-Agent generates up to `pr_code_suggestions.num_code_suggestions_per_chunk` suggestions (default: 4).
|
- For each chunk, PR-Agent generates up to `pr_code_suggestions.num_code_suggestions_per_chunk` suggestions (default: 4).
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user