Skip to content

Commit 97e17b5

Browse files
committed
docs(ruleset): document required_reviewers rule parameter
Add documentation for the new required_reviewers nested block in both organization_ruleset and repository_ruleset resources. Documents the reviewer, file_patterns, and minimum_approvals attributes with their types and requirements.
1 parent 1195222 commit 97e17b5

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

website/docs/r/organization_ruleset.html.markdown

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,22 @@ The `rules` block supports the following:
220220

221221
- `review_draft_pull_requests` - (Optional) (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`.
222222

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))
224+
225+
#### rules.pull_request.required_reviewers ####
226+
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))
228+
229+
* `file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve.
230+
231+
* `minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional.
232+
233+
#### rules.pull_request.required_reviewers.reviewer ####
234+
235+
* `id` - (Required) (Number) The ID of the reviewer (Team ID).
236+
237+
* `type` - (Required) (String) The type of reviewer. Currently only `Team` is supported.
238+
223239
#### rules.required_status_checks ####
224240

225241
- `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))

website/docs/r/repository_ruleset.html.markdown

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,22 @@ The `rules` block supports the following:
222222

223223
- `review_draft_pull_requests` - (Optional) (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`.
224224

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))
226+
227+
#### rules.pull_request.required_reviewers ####
228+
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))
230+
231+
* `file_patterns` - (Required) (List of String) File patterns (fnmatch syntax) that this reviewer must approve.
232+
233+
* `minimum_approvals` - (Required) (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional.
234+
235+
#### rules.pull_request.required_reviewers.reviewer ####
236+
237+
* `id` - (Required) (Number) The ID of the reviewer (Team ID).
238+
239+
* `type` - (Required) (String) The type of reviewer. Currently only `Team` is supported.
240+
225241
#### rules.required_deployments ####
226242

227243
- `required_deployment_environments` - (Required) (List of String) The environments that must be successfully deployed to before branches can be merged.

0 commit comments

Comments
 (0)