Skip to content

Commit 221d327

Browse files
committed
Document options in README
1 parent cfe4751 commit 221d327

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ You can install commitstat locally to test your parsing patterns, but commit sta
2626
$ curl https://rg.gosu.cc/dropseed/commitstat/master/install.sh | bash -s -- -b $HOME/bin
2727
```
2828

29+
## Options
30+
31+
### `--goal`
32+
33+
Either "increase" or "decrease". This is the direction you *want* the stat to go. For example, test coverage should "increase" and if it actually decreases, then a failling status will be report. If the stat is new or doesn't change, it is considered successful.
34+
35+
### `--name`
36+
37+
Will be prefixed by `commitstat/` when submitted as a GitHub commit status.
38+
Changing the name for an existing stat will break the comparison feature until the new name shows up on your main/master branch.
39+
40+
### `--regex` (optional)
41+
42+
A regular expression to parse the file/stdin for a specific value.
43+
There should be exactly one capture group in your regular expression (using parentheses) and you can include extra characters like a percent sign "%".
44+
The extra characters will simply be removed when comparing the values (ex. "36%" will be interpreted as "36") so be careful not to mix units like "mb" vs "gb" as they won't convert correctly (ex. "1mb" and "1gb" will both be interpreted as "1").
45+
46+
By default commitstat assumes the input is simply a number (ex. `stat -f %z app.zip | commitstat -`).
47+
2948
## GitHub Action
3049

3150
You can run commitstat right after your tests and once you have some sort of stat to parse.

0 commit comments

Comments
 (0)