Skip to content

Commit 7f2ea34

Browse files
committed
update documentation for configuration file
1 parent a1dfed9 commit 7f2ea34

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ and use resulting `_build/default/src/notabot.exe` binary.
2020

2121
## Running
2222

23-
Configuration is read at startup from `notabot.json` and `secrets.json` files
24-
according to `lib/notabot.atd` schema.
23+
At startup time, secrets are read from the local `secrets.json` file. The main configuration is read remotely from a `notabot.json` file in the default branch, and its schema is defined in `lib/notabot.atd`.
2524

2625
### Documentation
2726

documentation/config_docs.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ Config file is where the variables affecting the behaviour of notabot are define
3636
**example**
3737
```json
3838
"status_rules": {
39-
"name": [
39+
"title": [
4040
"default",
4141
"buildkite/pipeline2"
4242
],
4343
"status": {
4444
"pending": false,
45-
"success": true,
45+
"success": "once",
4646
"failure": true,
47-
"error": true
47+
"error": true,
48+
"cancelled": "^\\(Build #[0-9]+ canceled by .+\\|Failed (exit status 255)\\)$"
4849
}
4950
},
5051
```
@@ -56,7 +57,16 @@ Config file is where the variables affecting the behaviour of notabot are define
5657

5758
### Status State
5859

59-
A json object with fields of bools for each status type. Set them to true to suppress status of that type.
60+
A json object with fields of bools for each status type.
61+
62+
| value | description | optional | default |
63+
|-|-|-|-|
64+
| `pending` | `true` to notify; `false` to ignore | No | - |
65+
| `success` | `true` to notify; `false` to notify all; `"once"` to notify the first and ignore subsequent consecutive successes| No | - |
66+
| `failure` | `true` to notify; `false` to ignore | No | - |
67+
| `error` | `true` to notify; `false` to ignore | No | - |
68+
| `cancelled` | provide regex to ignore `failure` notifications with a description that matches it | Yes | - |
69+
6070

6171
## Label Config
6272

test/notabot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"offline": "github-api-cache",
33
"main_branch_name": "develop",
44
"status_rules": {
5-
"name": [
5+
"title": [
66
"default",
77
"buildkite/pipeline2"
88
],

0 commit comments

Comments
 (0)