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
*`branch_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. (see [below for nested schema](#rules.branch_name_pattern))
72
71
73
72
*`commit_author_email_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see [below for nested schema](#rules.commit_author_email_pattern))
@@ -90,6 +89,8 @@ The `rules` block supports the following:
90
89
91
90
*`required_status_checks` - (Optional) (Block List, Max: 1) Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. (see [below for nested schema](#rules.required_status_checks))
92
91
92
+
*`required_workflows` - (Optional) (Block List, Max: 1) Define which Actions workflows must pass before changes can be merged into a branch matching the rule. Multiple workflows can be specified. (see [below for nested schema](#rules.required_workflows))
93
+
93
94
*`tag_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. (see [below for nested schema](#rules.tag_name_pattern))
94
95
95
96
*`update` - (Optional) (Boolean) Only allow users with bypass permission to update matching refs.
@@ -104,7 +105,6 @@ The `rules` block supports the following:
104
105
105
106
*`negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches.
106
107
107
-
108
108
#### rules.commit_author_email_pattern ####
109
109
110
110
*`operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
@@ -115,7 +115,6 @@ The `rules` block supports the following:
115
115
116
116
*`negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches.
117
117
118
-
119
118
#### rules.commit_message_pattern ####
120
119
121
120
*`operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
@@ -126,7 +125,6 @@ The `rules` block supports the following:
126
125
127
126
*`negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches.
128
127
129
-
130
128
#### rules.committer_email_pattern ####
131
129
132
130
*`operator` - (Required) (String) The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`.
@@ -137,7 +135,6 @@ The `rules` block supports the following:
137
135
138
136
*`negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches.
139
137
140
-
141
138
#### rules.pull_request ####
142
139
143
140
*`dismiss_stale_reviews_on_push` - (Optional) (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`.
@@ -162,7 +159,17 @@ The `rules` block supports the following:
162
159
163
160
*`integration_id` - (Optional) (Number) The optional integration ID that this status check must originate from.
164
161
162
+
#### rules.required_workflows ####
163
+
164
+
*`required_workflow` - (Required) (Block Set, Min: 1) Actions workflows that are required. Multiple can be defined. (see [below for nested schema](#rules.required_workflows.required_workflow))
*`repository_id` - (Required) (Number) The ID of the repository. Names, full names and repository URLs are not supported.
169
+
170
+
*`path` - (Required) (String) The path to the YAML definition file of the workflow.
171
+
172
+
*`ref` - (Optional) (String) The optional ref from which to fetch the workflow. Defaults to `master`.
166
173
167
174
#### rules.tag_name_pattern ####
168
175
@@ -174,8 +181,6 @@ The `rules` block supports the following:
174
181
175
182
*`negate` - (Optional) (Boolean) If true, the rule will fail if the pattern matches.
176
183
177
-
178
-
179
184
#### bypass_actors ####
180
185
181
186
*`actor_id` - (Required) (Number) The ID of the actor that can bypass a ruleset.
@@ -185,6 +190,7 @@ The `rules` block supports the following:
185
190
*`bypass_mode` - (Optional) (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`.
186
191
187
192
~>Note: at the time of writing this, the following actor types correspond to the following actor IDs:
193
+
188
194
*`OrganizationAdmin` -> `1`
189
195
*`RepositoryRole` (This is the actor type, the following are the base repository roles and their associated IDs.)
190
196
*`maintain` -> `2`
@@ -208,21 +214,19 @@ One of `repository_id` and `repository_name` must be set for the rule to target
208
214
#### conditions.repository_name ####
209
215
210
216
*`exclude` - (Required) (List of String) Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.
211
-
217
+
212
218
*`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.
213
219
214
220
## Attributes Reference
215
221
216
222
The following additional attributes are exported:
217
223
218
-
219
224
*`etag` (String)
220
225
221
226
*`node_id` (String) GraphQL global node id for use with v4 API.
222
227
223
228
*`ruleset_id` (Number) GitHub ID for the ruleset.
224
229
225
-
226
230
## Import
227
231
228
232
GitHub Organization Rulesets can be imported using the GitHub ruleset ID e.g.
0 commit comments