-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(github_team_repository): allow for custom repository roles #1038
Conversation
…team repository permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the reason for removing the validation to allow all custom role names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's it. GitHub itself would handle whether the role exists going forward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_repository
resource by removing the string validation on thepermission
argument.Update the default permission to
push
, which is the default for the newer API resource; previously the API pulled the default from the (deprecated)permission
parameter of theteam
resource. 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