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: website/docs/d/enterprise_ruleset.html.markdown
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ data "github_enterprise_ruleset" "example" {
28
28
29
29
-`name` - (String) The name of the ruleset.
30
30
31
-
-`target` - (String) The target of the ruleset. Possible values are `branch`, `tag`, and `push`.
31
+
-`target` - (String) The target of the ruleset. Possible values are `branch`, `tag`, `push`, and `repository`.
32
32
33
33
-`enforcement` - (String) The enforcement level of the ruleset. Possible values are `disabled`, `active`, and `evaluate`.
34
34
@@ -112,6 +112,8 @@ data "github_enterprise_ruleset" "example" {
112
112
113
113
-`pull_request` - (List) Require all commits be made to a non-target branch and submitted via a pull request. (see [below for nested schema](#rulespull_request))
114
114
115
+
-`copilot_code_review` - (List) Automatically request Copilot code review for new pull requests. (see [below for nested schema](#rulescopilot_code_review))
116
+
115
117
-`required_status_checks` - (List) Status checks that are required. (see [below for nested schema](#rulesrequired_status_checks))
116
118
117
119
-`required_workflows` - (List) Actions workflows that are required. (see [below for nested schema](#rulesrequired_workflows))
@@ -136,6 +138,16 @@ data "github_enterprise_ruleset" "example" {
136
138
137
139
-`file_extension_restriction` - (List) File extension restrictions for push rulesets. (see [below for nested schema](#rulesfile_extension_restriction))
138
140
141
+
-`repository_creation` - (Boolean) Only allow users with bypass permission to create repositories. Only valid for `repository` target.
142
+
143
+
-`repository_deletion` - (Boolean) Only allow users with bypass permission to delete repositories. Only valid for `repository` target.
144
+
145
+
-`repository_transfer` - (Boolean) Only allow users with bypass permission to transfer repositories. Only valid for `repository` target.
146
+
147
+
-`repository_name` - (List) Restrict repository names to match specified patterns. Only valid for `repository` target. (see [below for nested schema](#rulesrepository_name))
148
+
149
+
-`repository_visibility` - (List) Restrict repository visibility changes. Only valid for `repository` target. (see [below for nested schema](#rulesrepository_visibility))
-`enterprise_slug` - (Required) (String) The slug of the enterprise.
272
317
273
318
-`name` - (Required) (String) The name of the ruleset.
274
319
275
-
-`target` - (Required) (String) Possible values are `branch`, `tag`and `push`. Note: The `push`target is in beta and is subject to change.
320
+
-`target` - (Required) (String) Possible values are `branch`, `tag`, `push`, and `repository`. Note: The `push`and `repository` targets are in beta and are subject to change.
276
321
277
322
-`enforcement` - (Required) (String) Possible values for Enforcement are `disabled`, `active`, `evaluate`. Note: `evaluate` is currently only supported for owners of type `organization`.
278
323
@@ -326,6 +371,16 @@ The `rules` block supports the following:
326
371
327
372
-`file_extension_restriction` - (Optional) (Block List, Max: 1) Prevent commits that include files with specified file extensions from being pushed to the commit graph. This rule only applies to rulesets with target `push`. (see [below for nested schema](#rulesfile_extension_restriction))
328
373
374
+
-`repository_creation` - (Optional) (Boolean) Only allow users with bypass permission to create repositories. Only valid for `repository` target.
375
+
376
+
-`repository_deletion` - (Optional) (Boolean) Only allow users with bypass permission to delete repositories. Only valid for `repository` target.
377
+
378
+
-`repository_transfer` - (Optional) (Boolean) Only allow users with bypass permission to transfer repositories. Only valid for `repository` target.
379
+
380
+
-`repository_name` - (Optional) (Block List, Max: 1) Restrict repository names to match specified patterns. Only valid for `repository` target. (see [below for nested schema](#rulesrepository_name))
381
+
382
+
-`repository_visibility` - (Optional) (Block List, Max: 1) Restrict repository visibility changes. Only valid for `repository` target. (see [below for nested schema](#rulesrepository_visibility))
383
+
329
384
#### rules.pull_request
330
385
331
386
-`dismiss_stale_reviews_on_push` - (Optional) (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`.
@@ -338,6 +393,8 @@ The `rules` block supports the following:
338
393
339
394
-`required_review_thread_resolution` - (Optional) (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to `false`.
340
395
396
+
-`allowed_merge_methods` - (Optional) (List of String, Min: 1) The merge methods allowed for pull requests. Possible values are `merge`, `squash`, and `rebase`.
397
+
341
398
#### rules.copilot_code_review
342
399
343
400
-`review_on_push` - (Optional) (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to `false`.
@@ -452,6 +509,18 @@ The `rules` block supports the following:
452
509
453
510
-`restricted_file_extensions` - (Required) (List of String, Min: 1) The file extensions that are restricted from being pushed to the commit graph.
454
511
512
+
#### rules.repository_name
513
+
514
+
-`pattern` - (Required) (String) The pattern to match repository names against.
515
+
516
+
-`negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches. Defaults to `false`.
517
+
518
+
#### rules.repository_visibility
519
+
520
+
-`internal` - (Optional) (Boolean) Allow internal visibility for repositories. Defaults to `false`.
521
+
522
+
-`private` - (Optional) (Boolean) Allow private visibility for repositories. Defaults to `false`.
523
+
455
524
### bypass_actors
456
525
457
526
-`actor_id` - (Optional) (Number) The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`. Some resources such as DeployKey do not have an ID and this should be omitted.
0 commit comments