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
docs(ruleset): fix documentation errors in ruleset resources
- Add missing allowed_merge_methods field to pull_request section
- Fix merge_queue fields from Required to Optional with defaults
- Fix actor_id to show Optional with note about DeployKey
- Add DeployKey to actor_type enum list
- Add protected field to conditions.repository_name
- Fix required_code_scanning_tool anchor link
- Remove duplicate do_not_enforce_on_create
@@ -220,25 +220,27 @@ The `rules` block supports the following:
220
220
221
221
-`review_draft_pull_requests` - (Optional) (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`.
222
222
223
-
*`required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rules.pull_request.required_reviewers))
223
+
-`allowed_merge_methods` - (Required) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled.
224
+
225
+
-`required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rulespull_requestrequired_reviewers))
224
226
225
227
#### rules.pull_request.required_reviewers ####
226
228
227
-
*`reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rules.pull_request.required_reviewers.reviewer))
229
+
-`reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rulespull_requestrequired_reviewersreviewer))
228
230
229
-
*`file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve.
231
+
-`file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve.
230
232
231
-
*`minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional.
233
+
-`minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional.
*`id` - (Required) (Number) The ID of the reviewer (Team ID).
237
+
-`id` - (Required) (Number) The ID of the reviewer (Team ID).
236
238
237
-
*`type` - (Required) (String) The type of reviewer. Currently only `Team` is supported.
239
+
-`type` - (Required) (String) The type of reviewer. Currently only `Team` is supported.
238
240
239
241
#### rules.required_status_checks ####
240
242
241
-
-`required_check` - (Required) (Block Set, Min: 1) Status checks that are required. Several can be defined. (see [below for nested schema](#rulesrequired_status_checks.required_check))
243
+
-`required_check` - (Required) (Block Set, Min: 1) Status checks that are required. Several can be defined. (see [below for nested schema](#rulesrequired_status_checksrequired_check))
242
244
243
245
-`strict_required_status_checks_policy` - (Optional) (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`.
244
246
@@ -306,7 +308,7 @@ The `rules` block supports the following:
306
308
307
309
#### bypass_actors ####
308
310
309
-
-`actor_id` - (Required) (Number) The ID of the actor that can bypass a ruleset.
311
+
-`actor_id` - (Optional) (Number) The ID of the actor that can bypass a ruleset. Some actor types such as `DeployKey` do not have an ID.
310
312
311
313
-`actor_type` (String) The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.
312
314
@@ -339,8 +341,8 @@ One of `repository_id` and `repository_name` must be set for the rule to target
339
341
#### conditions.repository_name ####
340
342
341
343
-`exclude` - (Required) (List of String) Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.
342
-
343
344
-`include` - (Required) (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories.
345
+
-`protected` - (Optional) (Boolean) Whether renaming of target repositories is prevented. Defaults to `false`.
@@ -193,19 +193,19 @@ The `rules` block supports the following:
193
193
194
194
#### rules.merge_queue ####
195
195
196
-
-`check_response_timeout_minutes` - (Required) (Number)Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to `60`.
196
+
-`check_response_timeout_minutes` - (Optional) (Number)Maximum time for a required status check to report a conclusion. After this much time has elapsed, checks that have not reported a conclusion will be assumed to have failed. Defaults to `60`.
197
197
198
-
-`grouping_strategy` - (Required) (String)When set to ALLGREEN, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to HEADGREEN, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: ALLGREEN, HEADGREEN. Defaults to `ALLGREEN`.
198
+
-`grouping_strategy` - (Optional) (String)When set to `ALLGREEN`, the merge commit created by merge queue for each PR in the group must pass all required checks to merge. When set to `HEADGREEN`, only the commit at the head of the merge group, i.e. the commit containing changes from all of the PRs in the group, must pass its required checks to merge. Can be one of: `ALLGREEN`, `HEADGREEN`. Defaults to `ALLGREEN`.
199
199
200
-
-`max_entries_to_build` - (Required) (Number) Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to `5`.
200
+
-`max_entries_to_build` - (Optional) (Number) Limit the number of queued pull requests requesting checks and workflow runs at the same time. Defaults to `5`.
201
201
202
-
-`max_entries_to_merge` - (Required) (Number) Limit the number of queued pull requests that will be merged together in a group. Defaults to `5`.
202
+
-`max_entries_to_merge` - (Optional) (Number) Limit the number of queued pull requests that will be merged together in a group. Defaults to `5`.
203
203
204
-
-`merge_method` - (Required) (String) Method to use when merging changes from queued pull requests. Can be one of: MERGE, SQUASH, REBASE. Defaults to `MERGE`.
204
+
-`merge_method` - (Optional) (String) Method to use when merging changes from queued pull requests. Can be one of: `MERGE`, `SQUASH`, `REBASE`. Defaults to `MERGE`.
205
205
206
-
-`min_entries_to_merge` - (Required) (Number) The minimum number of PRs that will be merged together in a group. Defaults to `1`.
206
+
-`min_entries_to_merge` - (Optional) (Number) The minimum number of PRs that will be merged together in a group. Defaults to `1`.
207
207
208
-
-`min_entries_to_merge_wait_minutes` - (Required) (Number) The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to `5`.
208
+
-`min_entries_to_merge_wait_minutes` - (Optional) (Number) The time merge queue should wait after the first PR is added to the queue for the minimum group size to be met. After this time has elapsed, the minimum group size will be ignored and a smaller group will be merged. Defaults to `5`.
209
209
210
210
#### rules.pull_request ####
211
211
@@ -222,21 +222,23 @@ The `rules` block supports the following:
222
222
223
223
-`review_draft_pull_requests` - (Optional) (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`.
224
224
225
-
*`required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rules.pull_request.required_reviewers))
225
+
-`allowed_merge_methods` - (Required) (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include `merge`, `squash`, and `rebase`. At least one must be enabled.
226
+
227
+
-`required_reviewers` - (Optional) (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see [below for nested schema](#rulespull_requestrequired_reviewers))
226
228
227
229
#### rules.pull_request.required_reviewers ####
228
230
229
-
*`reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rules.pull_request.required_reviewers.reviewer))
231
+
-`reviewer` - (Required) (Block List, Max: 1) The reviewer that must review matching files. (see [below for nested schema](#rulespull_requestrequired_reviewersreviewer))
230
232
231
-
*`file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve.
233
+
-`file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve.
232
234
233
-
*`minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional.
235
+
-`minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional.
*`id` - (Required) (Number) The ID of the reviewer (Team ID).
239
+
-`id` - (Required) (Number) The ID of the reviewer (Team ID).
238
240
239
-
*`type` - (Required) (String) The type of reviewer. Currently only `Team` is supported.
241
+
-`type` - (Required) (String) The type of reviewer. Currently only `Team` is supported.
240
242
241
243
#### rules.required_deployments ####
242
244
@@ -296,7 +298,7 @@ The `rules` block supports the following:
296
298
297
299
#### bypass_actors ####
298
300
299
-
-`actor_id` - (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app)
301
+
-`actor_id` - (Optional) (Number) The ID of the actor that can bypass a ruleset. If `actor_type` is `Integration`, `actor_id` is a GitHub App ID. App ID can be obtained by following instructions from the [Get an App API docs](https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-app). Some actor types such as `DeployKey` do not have an ID.
300
302
301
303
-`actor_type` (String) The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`, `DeployKey`.
302
304
@@ -312,7 +314,9 @@ The `rules` block supports the following:
312
314
313
315
#### conditions ####
314
316
315
-
-`ref_name` - (Required) (Block List, Min: 1, Max: 1) (see [below for nested schema](#conditionsref_name))
317
+
-`ref_name` - (Optional) (Block List, Max: 1) Required for `branch` and `tag` targets. Must NOT be set for `push` targets. (see [below for nested schema](#conditionsref_name))
318
+
319
+
~> **Note:** For `push` targets, do not include `ref_name` in conditions. Push rulesets operate on file content, not on refs. The `conditions` block is optional for push targets.
0 commit comments