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
|`main_branch_name`| main branch used for the repo; filtering notifications about merges of main into other branches | Yes | - |
32
+
|`main_branch_name`| main branch used for the repo; filtering notifications about merges of main into other branches, and constraining prefix rule application| Yes | - |
33
33
|`label_rules`| label rules config object | No | - |
34
34
|`prefix_rules`| prefix rules config object | No | - |
35
35
|`status_rules`| status rules config object | No | - |
@@ -97,7 +97,7 @@ A **label rule** specifies whether or not a Slack channel should be notified, ba
97
97
```json
98
98
"prefix_rules": {
99
99
"default_channel": "default",
100
-
"default_branch_filters": ["develop"],
100
+
"filter_main_branch": true,
101
101
"rules": [
102
102
{
103
103
"match": [
@@ -122,7 +122,7 @@ A **label rule** specifies whether or not a Slack channel should be notified, ba
122
122
| value | description | if absent |
123
123
|-|-|-|
124
124
|`default_channel`| same behavior as label rule `default_channel`||
125
-
|`default_branch_filters`|fallback branch filters (see below) if none are declared locally for a rule |don't apply branch filtering and show `distinct` commits only |
125
+
|`filter_main_branch`|if true and `main_branch_name` is declared, use main branch to filter rules that have no local filter; otherwise, don't apply branch filtering and show `distinct` commits only| false|
126
126
|`rules`| list of `prefix_rule` objects | required field |
127
127
128
128
### Prefix Rule
@@ -131,14 +131,14 @@ A **prefix rule** specifies whether or not a Slack channel should be notified, b
131
131
132
132
Default behavior is to apply each rule regardless of what branch is pushed, and when a rule is matched, show its `distinct` commits only.
133
133
Branch filters limit rule application to selected branches, and shows _all_ commits on match.
134
-
The filters can be declared globally with `default_branch_filters` (see above), or locally per rule with `branch_filters`, where the latter takes precedence.
134
+
The filters can be declared globally with `filter_main_branch` (see above), or locally per rule with `branch_filters`, where the latter takes precedence.
135
135
To ignore a globally declared filter for a single rule, declare one locally with an empty list, as shown in the example above.
136
136
137
137
| value | description | if absent |
138
138
|-|-|-|
139
139
|`match`| if commit files have any prefix in this list, they should be routed to the channel | all prefixes matched |
140
140
|`ignore`| if commit files have any prefix in this list, they shouldn't be routed to the channel (even if they have any `match` prefixes) | fall back on `match` field behavior |
141
-
|`branch_filters`| consider commits only if pushed ref branch is in this list | fall back on `default_branch_filters` field behavior (see above) |
141
+
|`branch_filters`| consider commits only if pushed ref branch is in this list | fall back on `filter_main_branch` field behavior (see above) |
142
142
|`channel`| channel to notify if the rule is matched | required field |
0 commit comments