Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to GitHub Team API's (#275)
#257 did a fantastic job closing the gap on missing functionality in the module related to GitHub Teams. This PR just adds onto that work by providing options that will reduce the need for additional queries during common operations. * `Get-GitHubTeam`: **Breaking Change** Looking up a team by its `ID` has been deprecated per GitHub documentation. Removed that functionality and added the ability to look up by `slug` instead. This also means that you can now pipe in a team and get back the specific result without needing to filter through all org results. * `Get-GitHubTeamMember`: Updated to use the `slug` instead of the team `ID`. * `New-GitHubTeam`: Added ability to pass in the `ParentTeamId` (also via the pipeline) to avoid the need to query through all org teams. * `Set-GitHubTeam`: Added ability to pass in the team `slug` (also via the pipeline) to avoid the need to query through all org teams. Similar to `New-GitHubTeam`, also added the ability to pass-in the `ParentTeamId` to avoid the full org team lookup. * `Remove-GitHubTeam`: Added ability to pass in the team `slug` (also via the pipeline) to avoid the need to query through all org teams. * Added `Rename-GitHubTeam` as a helper/wrapper on top of `Set-GitHubTeam` * Added additional pipeline tests for existing functions * Added new tests for `Rename-GitHubTeam` and `Get-GitHubTeamMember` * Small update to formatters to simplify the display of the team parent References: [GitHub Teams API](https://developer.github.com/v3/teams/)
- Loading branch information