example best practice

This commit is contained in:
mrT23
2024-07-12 17:07:23 +03:00
parent dfb339ab44
commit 41c48ca5b5
2 changed files with 18 additions and 9 deletions

View File

@ -102,8 +102,9 @@ This page can contain a list of best practices, coding standards, and guidelines
The AI model will use this page as a reference, and in case the PR code violates any of the guidelines, it will suggest improvements accordingly, with a dedicated label: `Organization The AI model will use this page as a reference, and in case the PR code violates any of the guidelines, it will suggest improvements accordingly, with a dedicated label: `Organization
best practice`. best practice`.
Example for a `best_practices.md` content can be found [here](https://pr-agent-docs.codium.ai/usage-guide/EXAMPLE_BEST_PRACTICE.md) (adapted from Google's [pyguide](https://google.github.io/styleguide/pyguide.html)). Example for a `best_practices.md` content can be found [here](https://github.com/Codium-ai/pr-agent/blob/main/docs/docs/usage-guide/EXAMPLE_BEST_PRACTICE.md) (adapted from Google's [pyguide](https://google.github.io/styleguide/pyguide.html)).
This file is only an example. Since it is used as a prompt for an AI model, we want to emphasize the following: This file is only an example. Since it is used as a prompt for an AI model, we want to emphasize the following:
- It should be written in a clear and concise manner - It should be written in a clear and concise manner
- If needed, it should give short relevant code snippets as examples - If needed, it should give short relevant code snippets as examples
- Up to 800 lines are allowed - Up to 800 lines are allowed

View File

@ -43,15 +43,23 @@ num_code_suggestions = ...
- The `pr_commands` lists commands that will be executed automatically when a PR is opened. - The `pr_commands` lists commands that will be executed automatically when a PR is opened.
- The `[pr_reviewer]` section contains the configurations for the `review` tool you want to edit (if any). - The `[pr_reviewer]` section contains the configurations for the `review` tool you want to edit (if any).
### Incremental Mode [//]: # ()
Incremental review only considers changes since the last PR-Agent review. This can be useful when working on the PR in an iterative manner, and you want to focus on the changes since the last review instead of reviewing the entire PR again. [//]: # (### Incremental Mode)
For invoking the incremental mode, the following command can be used:
```
/review -i
```
Note that the incremental mode is only available for GitHub.
![incremental review](https://codium.ai/images/pr_agent/incremental_review_2.png){width=512} [//]: # (Incremental review only considers changes since the last PR-Agent review. This can be useful when working on the PR in an iterative manner, and you want to focus on the changes since the last review instead of reviewing the entire PR again.)
[//]: # (For invoking the incremental mode, the following command can be used:)
[//]: # (```)
[//]: # (/review -i)
[//]: # (```)
[//]: # (Note that the incremental mode is only available for GitHub.)
[//]: # ()
[//]: # (![incremental review](https://codium.ai/images/pr_agent/incremental_review_2.png){width=512})
[//]: # (### PR Reflection) [//]: # (### PR Reflection)