Skip to content

Commit 7a2e6da

Browse files
committed
Add docs about default branch security
1 parent 32e2587 commit 7a2e6da

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "default_branch_security"
3+
---
4+
5+
## Configuration
6+
7+
<div className="config-wrapper"><div className="config">__name__: default_branch_security</div>
8+
<div className="config">__type__: string</div>
9+
<div className="config">__default__: ''</div></div>
10+
11+
```json showLineNumbers
12+
{
13+
"name": "company/project",
14+
"extra": {
15+
"violinist": {
16+
// highlight-next-line
17+
"default_branch_security": ""
18+
}
19+
}
20+
}
21+
```
22+
23+
Indicate what branch you want the Violinist pull requests created against, spefically if the update is a security update.
24+
25+
> **Note:** This option can be used within [rules](/configuration/rules) to target different security branches for different package groups.
26+
27+
## Explanation
28+
29+
Different projects uses different workflows for their branches. For example, your default branch in your VCS provider might be your production branch (for example `main`) while you want the merge requests to be created towards a development branch (for example `develop`). By default, Violinist will use the default branch for the repository to create the merge requests, but if you want the base branch to differ from this setting when merge requests are security updates, you want to use the `default_branch_security` option.
30+
31+
## Example
32+
33+
If a project uses the `develop` branch as the default branch, and you want the merge requests that are security updates to go straigth to `main`, you might want to configure your project like so:
34+
35+
```json showLineNumbers
36+
{
37+
"name": "company/project",
38+
"description": "My awesome project",
39+
"extra": {
40+
"violinist": {
41+
// highlight-next-line
42+
"default_branch_security": "main"
43+
}
44+
}
45+
}
46+
```
47+
48+
If you do not enter anything in this field, leaving the default value for it in there (`""` - an empty string) the project will use the settings from the project repository. In the example above that would mean the branch `develop`.
49+
50+
Please also note that if you have a value for the configuration option [default_branch](/configuration/default_branch) then this will be used as a fallback for a default value of empty string (`""`) for this configuration option (`default_branch_security`).

0 commit comments

Comments
 (0)