mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-03 20:30:41 +08:00
docs: convert info box to standard heading for hierarchical best practices setup
This commit is contained in:
@ -218,11 +218,11 @@ For organizations managing multiple repositories with different requirements, Qo
|
|||||||
2. **Groups of repositories**: Repositories can be mapped to shared group-level best practices for consistent standards across similar projects
|
2. **Groups of repositories**: Repositories can be mapped to shared group-level best practices for consistent standards across similar projects
|
||||||
3. **Monorepos with subprojects**: Large monorepos can have both repository-level and subproject-level best practices, with automatic path-based matching
|
3. **Monorepos with subprojects**: Large monorepos can have both repository-level and subproject-level best practices, with automatic path-based matching
|
||||||
|
|
||||||
???- info "Setting up global hierarchical best practices"
|
#### Setting up global hierarchical best practices
|
||||||
|
|
||||||
1\. Create a new repository named `pr-agent-settings` in your organization/workspace.
|
1\. Create a new repository named `pr-agent-settings` in your organization/workspace.
|
||||||
|
|
||||||
2\. Build the folder hierarchy in your `pr-agent-settings` repository, for example:
|
2\. Build the folder hierarchy in your `pr-agent-settings` repository, for example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pr-agent-settings/
|
pr-agent-settings/
|
||||||
@ -247,7 +247,7 @@ For organizations managing multiple repositories with different requirements, Qo
|
|||||||
└── ... # More repositories
|
└── ... # More repositories
|
||||||
```
|
```
|
||||||
|
|
||||||
3\. Define the metadata file `metadata.yaml` that maps your repositories to their relevant best practices paths, for example:
|
3\. Define the metadata file `metadata.yaml` that maps your repositories to their relevant best practices paths, for example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Standalone repos
|
# Standalone repos
|
||||||
@ -279,7 +279,7 @@ For organizations managing multiple repositories with different requirements, Qo
|
|||||||
- "qodo-monorepo/qodo-gitlab"
|
- "qodo-monorepo/qodo-gitlab"
|
||||||
```
|
```
|
||||||
|
|
||||||
4\. Set the following configuration in your global configuration file:
|
4\. Set the following configuration in your global configuration file:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[best_practices]
|
[best_practices]
|
||||||
@ -312,21 +312,32 @@ For organizations managing multiple repositories with different requirements, Qo
|
|||||||
- **Monorepo subproject matching**: For monorepos, Qodo Merge automatically matches PR file paths against subproject paths to apply relevant best practices
|
- **Monorepo subproject matching**: For monorepos, Qodo Merge automatically matches PR file paths against subproject paths to apply relevant best practices
|
||||||
- **Multiple group inheritance**: Repositories can inherit from multiple groups, and all applicable best practices are combined
|
- **Multiple group inheritance**: Repositories can inherit from multiple groups, and all applicable best practices are combined
|
||||||
|
|
||||||
#### Best practices for multiple languages
|
[//]: # (#### Best practices for multiple languages)
|
||||||
|
|
||||||
For a git organization working with multiple programming languages, you can maintain a centralized global `best_practices.md` file containing language-specific guidelines.
|
[//]: # ()
|
||||||
When reviewing pull requests, Qodo Merge automatically identifies the programming language and applies the relevant best practices from this file.
|
[//]: # (For a git organization working with multiple programming languages, you can maintain a centralized global `best_practices.md` file containing language-specific guidelines.)
|
||||||
|
|
||||||
To do this, structure your `best_practices.md` file using the following format:
|
[//]: # (When reviewing pull requests, Qodo Merge automatically identifies the programming language and applies the relevant best practices from this file.)
|
||||||
|
|
||||||
```
|
[//]: # ()
|
||||||
# [Python]
|
[//]: # (To do this, structure your `best_practices.md` file using the following format:)
|
||||||
...
|
|
||||||
# [Java]
|
[//]: # ()
|
||||||
...
|
[//]: # (```)
|
||||||
# [JavaScript]
|
|
||||||
...
|
[//]: # (# [Python])
|
||||||
```
|
|
||||||
|
[//]: # (...)
|
||||||
|
|
||||||
|
[//]: # (# [Java])
|
||||||
|
|
||||||
|
[//]: # (...)
|
||||||
|
|
||||||
|
[//]: # (# [JavaScript])
|
||||||
|
|
||||||
|
[//]: # (...)
|
||||||
|
|
||||||
|
[//]: # (```)
|
||||||
|
|
||||||
#### Dedicated label for best practices suggestions
|
#### Dedicated label for best practices suggestions
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user