You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/config_docs.md
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,18 +80,28 @@ A json object with fields of bools for each status type.
80
80
"default_channel": "default",
81
81
"rules": [
82
82
{
83
-
"allow": ["backend"],
83
+
"allow": [
84
+
"backend"
85
+
],
86
+
"ignore": [],
84
87
"channel": "backend"
85
88
},
86
89
{
87
-
"allow": ["a1"],
90
+
"allow": [
91
+
"a1"
92
+
],
93
+
"ignore": [],
88
94
"channel": "a1-bot"
89
95
},
90
96
{
91
-
"allow": ["a3"],
97
+
"allow": [
98
+
"a3"
99
+
],
100
+
"ignore": [],
92
101
"channel": "a3"
93
102
},
94
103
{
104
+
"allow": [],
95
105
"ignore": [
96
106
"backend",
97
107
"a1",
@@ -110,12 +120,12 @@ A json object with fields of bools for each status type.
110
120
111
121
### Label Rule
112
122
113
-
A **label rule** specifies whether or not a Slack channel should be notified, based on the labels present in the given payload. For each rule, `ignore` is a blacklist of labels that should not notify the rule's channel, and `allow` is a whitelist of labels that should. The `ignore` list takes precedence over the `allow` list. Both are optional; if neither are provided, the rule will always generate a notification for its channel.
123
+
A **label rule** specifies whether or not a Slack channel should be notified, based on the labels present in the given payload. For each rule, `ignore` is a blacklist of labels that should not notify the rule's channel, and `allow` is a whitelist of labels that should. If a label exists in both lists, the `ignore` list takes precedence. If an empty `ignore` list is provided, nothing is ignored. If an empty `allow` list is provided, everything is allowed. Both are optional; if neither are provided, the rule will always generate a notification for its channel.
114
124
115
125
| value | description | optional | default |
116
126
|-|-|-|-|
117
-
|`allow`|whitelist of labels that should match the rule| Yes | all labels allowed if no list provided |
118
-
|`ignore`|blacklist of labels that shouldn't match the rule| Yes | - |
127
+
|`allow`|if notifications match any label in this list, they should be routed to the channel| Yes | all labels allowed if no list provided |
128
+
|`ignore`|if notifications match any label in this list, they shouldn't be routed to the channel (even if they match any allow labels)| Yes | - |
119
129
|`channel`| channel to use as webhook if the rule is matched | No | - |
120
130
121
131
## Prefix Options
@@ -128,17 +138,23 @@ A **label rule** specifies whether or not a Slack channel should be notified, ba
128
138
"default_channel": "default",
129
139
"rules": [
130
140
{
131
-
"allow": ["backend/a1"],
141
+
"allow": [
142
+
"backend/a1"
143
+
],
144
+
"ignore": [],
132
145
"channel": "a1"
133
146
},
134
147
{
135
148
"allow": [
136
149
"backend/a5",
137
150
"backend/a4"
138
151
],
152
+
"ignore": [],
139
153
"channel": "backend"
140
154
},
141
155
{
156
+
"allow": [],
157
+
"ignore": [],
142
158
"channel": "all-push-events"
143
159
}
144
160
]
@@ -151,6 +167,6 @@ A **prefix rule** specifies whether or not a Slack channel should be notified, b
151
167
152
168
| value | description | optional | default |
153
169
|-|-|-|-|
154
-
|`allow`|whitelist of file prefixes that should match the rule| Yes | all prefixes allowed if no list provided |
155
-
|`ignore`|blacklist of file prefixes that shouldn't match the rule| Yes | - |
170
+
|`allow`|if commit files match any prefix in this list, they should be routed to the channel| Yes | all prefixes allowed if no list provided |
171
+
|`ignore`|if commit files match any prefix in this list, they shouldn't be routed to the channel (even if they match any allow prefixes)| Yes | - |
156
172
|`channel`| channel to use as webhook if the rule is matched | No | - |
0 commit comments