Skip to content

Commit

Permalink
Documented logs.badge.matchBranchRegex
Browse files Browse the repository at this point in the history
Replaced `logs.badge.branch` with `logs.badge.matchBranchRegex` in examples,
since it is much more powerful, and probably a better long-term solution
to more complex scenarios.
  • Loading branch information
Ocramius committed Jul 14, 2021
1 parent 2787501 commit ada9e77
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion src/guide/mutation-badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,21 @@ Take these steps to enable the mutation score badge on your repository:
{
"logs": {
"badge": {
"branch": "master"
"matchBranchRegex": "/^release-.*$/"
}
}
}
```

It is also possible to use `logs.badge.branch`, which does an exact match against your branch, should you wish
to run reporting against a single specific branch. Be aware that `branch` and `matchBranchRegex` are mutually
exclusive:

```json
{
"logs": {
"badge": {
"branch": "main"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/guide/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The first time you run Infection for your project, it will ask you several quest
"perMutator": "per-mutator.md",
"github": true,
"badge": {
"branch": "master"
"matchBranchRegex": "/^master$/"
}
},
"tmpDir": "/opt/tmp-folder",
Expand Down

0 comments on commit ada9e77

Please sign in to comment.