|
| 1 | +--- |
| 2 | +title: "automerge_method_security" |
| 3 | +--- |
| 4 | + |
| 5 | + |
| 6 | +## Configuration |
| 7 | + |
| 8 | +<div className="config-wrapper"><div className="config">__name__: automerge_method_security</div> |
| 9 | +<div className="config">__type__: string</div> |
| 10 | +<div className="config">__default__: "merge"</div></div> |
| 11 | + |
| 12 | +```json showLineNumbers |
| 13 | +{ |
| 14 | + "name": "company/project", |
| 15 | + "extra": { |
| 16 | + "violinist": { |
| 17 | + // highlight-next-line |
| 18 | + "automerge_method_security": "merge" |
| 19 | + } |
| 20 | + } |
| 21 | +} |
| 22 | +``` |
| 23 | + |
| 24 | +Indicates which merge method should be used when using [automerge](/configuration/automerge). But in contrast to the [automerge_method](/configuration/automerge_method) option, this will allow you to have a separate method for security updates. |
| 25 | + |
| 26 | +> Note! This option currently does not work with Bitbucket. |
| 27 | +
|
| 28 | +## Explanation |
| 29 | + |
| 30 | +When violinist opens a merge request which enables automerge, the UI for the supported providers will allow you to select which method should be used for merging. The three options are `merge`, `rebase` or `squash`. If you leave this blank, violinist will use the default, which is `merge`. |
| 31 | + |
| 32 | +This option will only apply to security updates, and if there is another value specified for [automerge_method](/configuration/automerge_method) then the value for `automerge_method_security` will be used if its a security update. |
| 33 | + |
| 34 | +## Example |
| 35 | + |
| 36 | +Many people use a `main` branch for their production environment. Say you wanted to enable automerge with all your violinist.io merge requests, but if there was a security update, you would want this to be automerged into the `main` branch. And maybe for the main branch, you are required to use `merge` as the strategy, for git history purposes. Then let's say your configuration looked something like this: |
| 37 | + |
| 38 | +```json showLineNumbers |
| 39 | +{ |
| 40 | + "name": "company/project", |
| 41 | + "extra": { |
| 42 | + "violinist": { |
| 43 | + "automerge": "1", |
| 44 | + "automerge_method": "squash", |
| 45 | + } |
| 46 | + } |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +Then, to make it use the branch `main` and the method `merge` for the security updates being created by violinist, then you would change it like this: |
| 51 | + |
| 52 | +```json showLineNumbers |
| 53 | +{ |
| 54 | + "name": "company/project", |
| 55 | + "extra": { |
| 56 | + "violinist": { |
| 57 | + "automerge": "1", |
| 58 | + "automerge_method": "squash", |
| 59 | + // highlight-start |
| 60 | + "default_branch_security": "main", |
| 61 | + "automerge_method_security": "merge" |
| 62 | + // highlight-end |
| 63 | + } |
| 64 | + } |
| 65 | +} |
| 66 | +``` |
| 67 | + |
| 68 | +If you leave this option blank (or use an invalid option value), it will use the value set for [automerge_method](/configuration/automerge_method) (if any). If no value is set for either of the options, it will use the default value which is `merge`. |
0 commit comments