Skip to content

Commit fe18870

Browse files
joshhuntnickfloyd
andauthored
feat: Add support for 'exempt' github_repository_ruleset bypass_mode (#2764)
* Add 'exempt' bypass type * update documentation * Fix auto-formatting * fix Descriptions --------- Co-authored-by: Nick Floyd <[email protected]>
1 parent 1d3427e commit fe18870

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

github/resource_github_organization_ruleset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
6464
"bypass_mode": {
6565
Type: schema.TypeString,
6666
Required: true,
67-
ValidateFunc: validation.StringInSlice([]string{"always", "pull_request"}, false),
68-
Description: "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`.",
67+
ValidateFunc: validation.StringInSlice([]string{"always", "pull_request", "exempt"}, false),
68+
Description: "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`, `exempt`.",
6969
},
7070
},
7171
},

github/resource_github_repository_ruleset.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ func resourceGithubRepositoryRuleset() *schema.Resource {
6969
"bypass_mode": {
7070
Type: schema.TypeString,
7171
Required: true,
72-
ValidateFunc: validation.StringInSlice([]string{"always", "pull_request"}, false),
73-
Description: "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`.",
72+
ValidateFunc: validation.StringInSlice([]string{"always", "pull_request", "exempt"}, false),
73+
Description: "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`, `exempt`.",
7474
},
7575
}},
7676
},

website/docs/r/organization_ruleset.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ The `rules` block supports the following:
214214

215215
* `actor_type` (String) The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.
216216

217-
* `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`.
217+
* `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`, `exempt`.
218218

219219
~>Note: at the time of writing this, the following actor types correspond to the following actor IDs:
220220

website/docs/r/repository_ruleset.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ The `rules` block supports the following:
260260

261261
* `actor_type` (String) The type of actor that can bypass a ruleset. Can be one of: `RepositoryRole`, `Team`, `Integration`, `OrganizationAdmin`.
262262

263-
* `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`.
263+
* `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`, `exempt`.
264264

265265
~> Note: at the time of writing this, the following actor types correspond to the following actor IDs:
266266

0 commit comments

Comments
 (0)