Skip to content

Commit

Permalink
feat(github_team_repository): allow for custom repository roles (#1038)
Browse files Browse the repository at this point in the history
* 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 <me@kfcampbell.com>

* Update github/resource_github_team_repository.go

Co-authored-by: joshuahancox <67631498+joshuahancox@users.noreply.github.com>

* Update website/docs/r/team_repository.html.markdown

Co-authored-by: joshuahancox <67631498+joshuahancox@users.noreply.github.com>

Co-authored-by: Keegan Campbell <me@kfcampbell.com>
Co-authored-by: joshuahancox <67631498+joshuahancox@users.noreply.github.com>
  • Loading branch information
3 people committed May 27, 2022
1 parent 62c19f7 commit 366aac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions github/resource_github_team_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ func resourceGithubTeamRepository() *schema.Resource {
ForceNew: true,
},
"permission": {
Type: schema.TypeString,
Optional: true,
Default: "pull",
ValidateFunc: validateValueFunc([]string{"pull", "triage", "push", "maintain", "admin"}),
Type: schema.TypeString,
Optional: true,
Default: "pull",
},
"etag": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/team_repository.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The following arguments are supported:
* `team_id` - (Required) The GitHub team id or the GitHub team slug
* `repository` - (Required) The repository to add to the team.
* `permission` - (Optional) The permissions of team members regarding the repository.
Must be one of `pull`, `triage`, `push`, `maintain`, or `admin`. Defaults to `pull`.
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`.


## Import
Expand Down

0 comments on commit 366aac0

Please sign in to comment.