feat: move configuration to a common config section, add documentation

This commit is contained in:
Paolo Mainardi
2024-09-06 18:32:46 +02:00
parent 2f7f60a469
commit 14b4723734
4 changed files with 51 additions and 18 deletions

View File

@ -112,3 +112,36 @@ LANGSMITH_API_KEY=<api_key>
LANGSMITH_PROJECT=<project>
LANGSMITH_BASE_URL=<url>
```
## Ignoring automatic commands in PRs
In some cases, you may want to ignore automatic commands in PRs. For example you may want to ignore MR with a specific title, or labels or from/to specific branches.
For example, to ignore MRs with a specific title such as "[AUTO]: foobar", you can add the following to your `configuration.toml` file:
```
[config]
ignore_mr_title = ["\\[AUTO\\]"]
```
Where the `ignore_mr_title` is a list of regex patterns to match the MR title you want to ignore.
To ignore MRs with specific labels, you can add the following to your `configuration.toml` file:
```
[config]
ignore_mr_labels = ["auto"]
```
Where the `ignore_mr_labels` is a list of labels you want to ignore.
To ignore MRs from specific branches, you can add the following to your `configuration.toml` file:
```
[config]
ignore_mr_source_branches = ['develop', 'main', 'master', 'stage']
ignore_mr_target_branches = ["qa"]
```
Where the `ignore_mr_source_branches` and `ignore_mr_target_branches` are lists of regex patterns to match the source and target branches you want to ignore.
They are not mutually exclusive, you can use them together or separately.