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: README.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,42 @@ overridevalidators:
123
123
124
124
A sample of `deployment-settings` file is found [here](docs/sample-settings/sample-deployment-settings.yml).
125
125
126
+
### Custom Status Checks
127
+
For branch protection rules and rulesets, you can allow for status checks to be defined outside of safe-settings together with your usual safe settings.
128
+
129
+
This can be defined at the org, sub-org, and repo level.
130
+
131
+
To configure this for branch protection rules, specifiy `{{EXTERNALLY_DEFINED}}` under the `contexts` keyword:
132
+
```yaml
133
+
branches:
134
+
- name: main
135
+
protection:
136
+
...
137
+
required_status_checks:
138
+
contexts:
139
+
- "{{EXTERNALLY_DEFINED}}"
140
+
```
141
+
142
+
For rulesets, specify `{{EXTERNALLY_DEFINED}}` under the `required_status_checks` keyword:
143
+
```yaml
144
+
rulesets:
145
+
- name: Status Checks
146
+
...
147
+
rules:
148
+
- type: required_status_checks
149
+
parameters:
150
+
required_status_checks:
151
+
- context: "{{EXTERNALLY_DEFINED}}"
152
+
```
153
+
154
+
Notes:
155
+
- For branch protection rules, contexts defined at the org level are merged together with the sub-org and repo level contexts.
156
+
- When `{{EXTERNALLY_DEFINED}}` is defined for a new branch protection rule or ruleset configuration, they will be deployed with no status checks.
157
+
- When an existing branch protection rule or ruleset configuration is ammended with `{{EXTERNALLY_DEFINED}}`, the status checks in the existing rules in GitHub will remain as is.
158
+
159
+
⚠️ **Warning:**
160
+
When `{{EXTERNALLY_DEFINED}}` is removed from an existing branch protection rule or ruleset configuration, the status checks in the existing rules in GitHub will revert to the checks that are defined in safe-settings.
161
+
126
162
### Performance
127
163
When there are 1000s of repos to be managed -- and there is a global settings change -- safe-settings will have to work efficiently and only make the necessary API calls.
0 commit comments