Skip to content

Commit 8cc5b8e

Browse files
authored
Merge branch 'main' into patch-1
2 parents be963e5 + 8540ea4 commit 8cc5b8e

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

.github/workflows/immediate-response.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
1919

2020
- name: Respond to issue or PR
21-
uses: peter-evans/create-or-update-comment@223779bc560943cb8f2aa0484a7c225c1585c597
21+
uses: peter-evans/create-or-update-comment@1f6c51492b7d8e91122ece56e2eb7ed38df14079
2222
with:
2323
issue-number: ${{ steps.extract.outputs.NUMBER }}
2424
body: >

github/resource_github_organization_ruleset.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
5252
"actor_id": {
5353
Type: schema.TypeInt,
5454
Required: true,
55-
Description: "The ID of the actor that can bypass a ruleset",
55+
Description: "The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.",
5656
},
5757
"actor_type": {
5858
Type: schema.TypeString,
@@ -83,7 +83,7 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
8383
Type: schema.TypeList,
8484
Optional: true,
8585
MaxItems: 1,
86-
Description: "Parameters for a repository ruleset ref name condition.",
86+
Description: "Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`.",
8787
Elem: &schema.Resource{
8888
Schema: map[string]*schema.Schema{
8989
"ref_name": {
@@ -112,10 +112,11 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
112112
},
113113
},
114114
"repository_name": {
115-
Type: schema.TypeList,
116-
Optional: true,
117-
MaxItems: 1,
118-
ConflictsWith: []string{"conditions.0.repository_id"},
115+
Type: schema.TypeList,
116+
Optional: true,
117+
MaxItems: 1,
118+
ExactlyOneOf: []string{"conditions.0.repository_id"},
119+
AtLeastOneOf: []string{"conditions.0.repository_id"},
119120
Elem: &schema.Resource{
120121
Schema: map[string]*schema.Schema{
121122
"include": {
@@ -144,10 +145,9 @@ func resourceGithubOrganizationRuleset() *schema.Resource {
144145
},
145146
},
146147
"repository_id": {
147-
Type: schema.TypeList,
148-
Optional: true,
149-
ConflictsWith: []string{"conditions.0.repository_name"},
150-
Description: "The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.",
148+
Type: schema.TypeList,
149+
Optional: true,
150+
Description: "The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.",
151151
Elem: &schema.Schema{
152152
Type: schema.TypeInt,
153153
},

github/resource_github_repository_ruleset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func resourceGithubRepositoryRuleset() *schema.Resource {
5757
"actor_id": {
5858
Type: schema.TypeInt,
5959
Required: true,
60-
Description: "The ID of the actor that can bypass a ruleset",
60+
Description: "The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.",
6161
},
6262
"actor_type": {
6363
Type: schema.TypeString,

website/docs/r/organization_ruleset.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ resource "github_organization_ruleset" "example" {
6161

6262
* `bypass_actors` - (Optional) (Block List) The actors that can bypass the rules in this ruleset. (see [below for nested schema](#bypass_actors))
6363

64-
* `conditions` - (Optional) (Block List, Max: 1) Parameters for an organization ruleset ref name condition. (see [below for nested schema](#conditions))
64+
* `conditions` - (Optional) (Block List, Max: 1) Parameters for an organization ruleset condition. `ref_name` is required alongside one of `repository_name` or `repository_id`. (see [below for nested schema](#conditions))
6565

6666
#### Rules ####
6767

@@ -178,7 +178,7 @@ The `rules` block supports the following:
178178

179179
#### bypass_actors ####
180180

181-
* `actor_id` - (Required) (Number) The ID of the actor that can bypass a ruleset
181+
* `actor_id` - (Required) (Number) The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.
182182

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

website/docs/r/repository_ruleset.html.markdown

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

196196
#### bypass_actors ####
197197

198-
* `actor_id` - (Required) (Number) The ID of the actor that can bypass a ruleset
198+
* `actor_id` - (Required) (Number) The ID of the actor that can bypass a ruleset. When `actor_type` is `OrganizationAdmin`, this should be set to `1`.
199199

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

0 commit comments

Comments
 (0)