Skip to content

Commit 366aac0

Browse files
Grantkfcampbelljoshua-hancox
authored
feat(github_team_repository): allow for custom repository roles (#1038)
* feat(github_team_repository): allow for custom roles to be passed to team repository permissions * Update website/docs/r/team_repository.html.markdown Co-authored-by: Keegan Campbell <[email protected]> * Update github/resource_github_team_repository.go Co-authored-by: joshuahancox <[email protected]> * Update website/docs/r/team_repository.html.markdown Co-authored-by: joshuahancox <[email protected]> Co-authored-by: Keegan Campbell <[email protected]> Co-authored-by: joshuahancox <[email protected]>
1 parent 62c19f7 commit 366aac0

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

github/resource_github_team_repository.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ func resourceGithubTeamRepository() *schema.Resource {
3333
ForceNew: true,
3434
},
3535
"permission": {
36-
Type: schema.TypeString,
37-
Optional: true,
38-
Default: "pull",
39-
ValidateFunc: validateValueFunc([]string{"pull", "triage", "push", "maintain", "admin"}),
36+
Type: schema.TypeString,
37+
Optional: true,
38+
Default: "pull",
4039
},
4140
"etag": {
4241
Type: schema.TypeString,

website/docs/r/team_repository.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The following arguments are supported:
4444
* `team_id` - (Required) The GitHub team id or the GitHub team slug
4545
* `repository` - (Required) The repository to add to the team.
4646
* `permission` - (Optional) The permissions of team members regarding the repository.
47-
Must be one of `pull`, `triage`, `push`, `maintain`, or `admin`. Defaults to `pull`.
47+
Must be one of `pull`, `triage`, `push`, `maintain`, `admin` or the name of an existing [custom repository role](https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization) within the organisation. Defaults to `pull`.
4848

4949

5050
## Import

0 commit comments

Comments
 (0)