-
Notifications
You must be signed in to change notification settings - Fork 907
feat: Add support for Enterprise Teams #3008
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
base: main
Are you sure you want to change the base?
Conversation
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
|
Hey @vmvarela 👋 Thank you for your contribution! We've started migration towards Context-aware provider functions, could you update the CRUD methods to those? So changing |
4e6cb30 to
17ba121
Compare
b070f07 to
a586037
Compare
deiga
left a comment
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 your contribution!
The Enteprise Teams functionality isn't yet published in the go-github SDK, but it will most likely be coming in v81. I would suggest to refactor this PR to use the upcoming release of the SDK instead of making our own API interactions.
We most likely won't get to merging this before we release v7 of the provider, where we'll hopefully quickly get to latest SDK version.
A few other notes:
- Try to leverage
ValidateDiagFuncin the Schema as much as possible, instead of failing in the CRUD provider functions on missing information. For more complex validations using aCustomizeDifffunction is a good option as well. That will allow the user to get errors onplaninstead ofapply - Please add top-level
Descriptionfields to all Schemata and ensure that allDescriptionfields contain same information as the docs pages. We'll be moving to generated docs pages in the near future
2997703 to
9fc330c
Compare
Add support for managing GitHub Enterprise Teams (enterprise-level teams): Resources: - github_enterprise_team: create/update/delete enterprise teams - github_enterprise_team_membership: manage team members - github_enterprise_team_organizations: assign teams to organizations Data sources: - github_enterprise_team: lookup by slug or ID - github_enterprise_teams: list all enterprise teams - github_enterprise_team_membership: check user membership - github_enterprise_team_organizations: list assigned orgs Note: These endpoints require GitHub Enterprise Cloud with a classic PAT that has enterprise admin permissions.
- Add ValidateDiagFunc to required schema fields for early validation in plan phase - Add validation import to resource_github_enterprise_team_membership - This allows users to get validation errors during plan instead of apply
- Add Description field to github_enterprise_team resource schema - Add Description field to github_enterprise_team_membership resource schema - Descriptions match the documentation pages and will be used for generated docs
- try EnterpriseService.GetTeam via reflection to stay forward-compatible with upcoming SDK release - keep REST fallback when SDK method is missing - no behavior change; builds with current v67 while ready for v81
- move required field emptiness checks into ValidateDiagFunc - remove redundant runtime empty checks in Read - keep behavior unchanged, but surface errors during plan
…rg data sources/resources - add top-level Description to enterprise team org data source and resource - add ValidateDiagFunc to required fields and drop runtime empty checks - add Description and validation to enterprise teams listing data source
35c1022 to
c830136
Compare
Add support for managing GitHub Enterprise Teams (enterprise-level teams):
Resources:
Data sources:
Note: These endpoints require GitHub Enterprise Cloud with a classic PAT that has enterprise admin permissions.
Resolves #3001
Before the change?
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!