-
Notifications
You must be signed in to change notification settings - Fork 6
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
Expose GitHub team ID #153
Conversation
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 believe some additional changes to the schema will be needed. Also would be great to add test coverage for this - though not sure how easy it will be to automate that end-to-end. At the very least - a test that runs a preview to ensure this is supported correctly in the generated SDK.
}, | ||
"githubTeamID": { | ||
"description": "The GitHub ID of the team to mirror. This is the only required parameter when creating a GitHub team -- all other parameters are taken from GitHub directly. Must be in the same GitHub organization that the Pulumi org is backed by.", | ||
"type": "number" |
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.
This needs to also be listed as an input property, right?
The schema still marks the other input properties as required, do those need to be made optional now?
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.
The schema still marks the other input properties as required, do those need to be made optional now?
Updated so name
is now optional, org and type are still needed to construct relevant URLs.
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.
Do we validate the various combinations in Check
?
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.
@pgavlin doesn't seem like it https://github.com/pulumi/pulumi-pulumiservice/blob/main/provider/pkg/provider/team.go#L99-L101
Most of this provider's checks seem to no-op like this. If it's worth doing while we're in here I can implement it.
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.
Most of this provider's checks seem to no-op like this
:(
If it's worth doing while we're in here I can implement it.
I think that it's worth doing in this case b/c there are different combinations of valid inputs depending on the team type.
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.
LGTM, just one question about Check
The team creation API for GitHub teams only requires a
githubTeamID
parameter, which it uses to fetch all the other details like team name, description, members, etc.I implemented
Read
while I was in here, because it was surprising to see this breakrefresh
due to a not-implemented error. Also implementedCheck
becausename
andgithubTeamId
are only required for certain team types.Tested and confirmed working by with the following program:
Fixes #151.