Skip to content

Commit d39addf

Browse files
committed
rename to excluded_members
1 parent c5627f8 commit d39addf

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

github/resource_github_team_settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func resourceGithubTeamSettings() *schema.Resource {
129129
Default: false,
130130
Description: "whether to notify the entire team when at least one member is also assigned to the pull request.",
131131
},
132-
"excluded_team_members": {
132+
"excluded_members": {
133133
Type: schema.TypeSet,
134134
Optional: true,
135135
Description: "A list of team member usernames to exclude from the PR review process.",
@@ -235,7 +235,7 @@ func resourceGithubTeamSettingsUpdate(d *schema.ResourceData, meta any) error {
235235
}
236236

237237
exclusionList := make([]githubv4.ID, 0)
238-
if excludedMembers, ok := settings["excluded_team_members"]; ok && excludedMembers != nil {
238+
if excludedMembers, ok := settings["excluded_members"]; ok && excludedMembers != nil {
239239
// Collect all usernames first
240240
usernames := make([]string, 0)
241241
for _, v := range excludedMembers.(*schema.Set).List() {

github/resource_github_team_settings_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func TestAccGithubTeamSettings(t *testing.T) {
138138
algorithm = "ROUND_ROBIN"
139139
member_count = 1
140140
notify = true
141-
excluded_team_members = ["octocat", "defunkt"]
141+
excluded_members = ["octocat", "defunkt"]
142142
}
143143
}
144144
`, teamName)
@@ -149,7 +149,7 @@ func TestAccGithubTeamSettings(t *testing.T) {
149149
"ROUND_ROBIN",
150150
),
151151
resource.TestCheckResourceAttr(
152-
"github_team_settings.test", "review_request_delegation.0.excluded_team_members.#",
152+
"github_team_settings.test", "review_request_delegation.0.excluded_members.#",
153153
"2",
154154
),
155155
)

website/docs/r/team_settings.html.markdown

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This resource manages the team settings (in particular the request review delega
1111

1212
Creating this resource will alter the team Code Review settings.
1313

14-
The team must both belong to the same organization configured in the provider on GitHub.
14+
The team must both belong to the same organization configured in the provider on GitHub.
1515

1616
~> **Note**: This resource relies on the v4 GraphQl GitHub API. If this API is not available, or the Stone Crop schema preview is not available, then this resource will not work as intended.
1717

@@ -30,7 +30,7 @@ resource "github_team_settings" "code_review_settings" {
3030
algorithm = "ROUND_ROBIN"
3131
member_count = 1
3232
notify = true
33-
excluded_team_members = ["octocat", "defunkt"]
33+
excluded_members = ["octocat", "defunkt"]
3434
}
3535
}
3636
```
@@ -39,18 +39,17 @@ resource "github_team_settings" "code_review_settings" {
3939

4040
The following arguments are supported:
4141

42-
* `team_id` - (Required) The GitHub team id or the GitHub team slug
43-
* `review_request_delegation` - (Optional) The settings for delegating code reviews to individuals on behalf of the team. If this block is present, even without any fields, then review request delegation will be enabled for the team. See [GitHub Review Request Delegation](#github-review-request-delegation-configuration) below for details. See [GitHub's documentation](https://docs.github.com/en/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team#configuring-team-notifications) for more configuration details.
42+
- `team_id` - (Required) The GitHub team id or the GitHub team slug
43+
- `review_request_delegation` - (Optional) The settings for delegating code reviews to individuals on behalf of the team. If this block is present, even without any fields, then review request delegation will be enabled for the team. See [GitHub Review Request Delegation](#github-review-request-delegation-configuration) below for details. See [GitHub's documentation](https://docs.github.com/en/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team#configuring-team-notifications) for more configuration details.
4444

4545
### GitHub Review Request Delegation Configuration
4646

4747
The following arguments are supported:
4848

49-
* `algorithm` - (Optional) The algorithm to use when assigning pull requests to team members. Supported values are `ROUND_ROBIN` and `LOAD_BALANCE`. Default value is `ROUND_ROBIN`
50-
* `member_count` - (Optional) The number of team members to assign to a pull request
51-
* `notify` - (Optional) whether to notify the entire team when at least one member is also assigned to the pull request
52-
* `excluded_team_members` - (Optional) A list of team member usernames to exclude from the PR review process.
53-
49+
- `algorithm` - (Optional) The algorithm to use when assigning pull requests to team members. Supported values are `ROUND_ROBIN` and `LOAD_BALANCE`. Default value is `ROUND_ROBIN`
50+
- `member_count` - (Optional) The number of team members to assign to a pull request
51+
- `notify` - (Optional) whether to notify the entire team when at least one member is also assigned to the pull request
52+
- `excluded_members` - (Optional) A list of team member usernames to exclude from the PR review process.
5453

5554
## Import
5655

@@ -59,7 +58,9 @@ GitHub Teams can be imported using the GitHub team ID, or the team slug e.g.
5958
```
6059
$ terraform import github_team.code_review_settings 1234567
6160
```
61+
6262
or,
63+
6364
```
6465
$ terraform import github_team_settings.code_review_settings SomeTeam
65-
```
66+
```

0 commit comments

Comments
 (0)