feat(github_team_repository): allow for custom repository roles#1038
feat(github_team_repository): allow for custom repository roles#1038kfcampbell merged 4 commits intomainfrom unknown repository
Conversation
…team repository permissions
kfcampbell
left a comment
There was a problem hiding this comment.
I like the idea of our default matching the API. Perhaps this can land in the next major version update.
| Type: schema.TypeString, | ||
| Optional: true, | ||
| Default: "pull", | ||
| ValidateFunc: validateValueFunc([]string{"pull", "triage", "push", "maintain", "admin"}), |
There was a problem hiding this comment.
Is the reason for removing the validation to allow all custom role names?
There was a problem hiding this comment.
Yeah, that's it. GitHub itself would handle whether the role exists going forward
There was a problem hiding this comment.
Is there a way to pull all possible roles from GitHub and then validate against that?
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
|
@kfcampbell is there a date for v5.0.0? We're waiting to use the functionality this PR brings 😅 Does removing the change to the default permission allow it to be moved to the next minor release instead? |
|
@grant-adarga Sorry for the delay. There's currently no estimated time on the date for v5.0.0.
I think this would be reasonable! If you change that, we can merge as-is, get into an upcoming minor release, and then open up a new PR we can put in the v5.0.0 milestone. |
joshua-hancox
left a comment
There was a problem hiding this comment.
I'd love to use this asap, can we merge with the old defaults?
|
Any indication on when this one will land? we desperately need this functionality so we can assign custom roles to users. |
Co-authored-by: joshuahancox <67631498+joshuahancox@users.noreply.github.com>
Co-authored-by: joshuahancox <67631498+joshuahancox@users.noreply.github.com>
|
@kfcampbell this should be ready to go now I've incorporated @joshuahancox suggested changes |
kfcampbell
left a comment
There was a problem hiding this comment.
Thanks for changing the default back! I've described here more on a possible longer-term route for this.
…grations#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 <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>
…grations#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 <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>
…grations#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 <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>
Allow custom repository roles to be passed to the
github_team_repositoryresource by removing the string validation on thepermissionargument.Update the default permission to
push, which is the default for the newer API resource; previously the API pulled the default from the (deprecated)permissionparameter of theteamresource. This may cause an unintended change for some provider users, so I'll leave this up for the maintainers to decide whether to include or not.I also opted to leave the tests unchanged as
"pull", "triage", "push", "maintain", "admin"are still valid test cases.Closes: #988