-
Notifications
You must be signed in to change notification settings - Fork 188
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
Improvements to GitHub Team API's #275
Conversation
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
@X-Guardian - Leaving this up a day before merging it in in case you have any feedback on it. |
63f69c7
to
48233f3
Compare
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
Formatters/GitHubTeams.Format.ps1xml
Outdated
<PropertyName>permission</PropertyName> | ||
</ListItem> | ||
<ListItem> | ||
<Label>Created</Label> |
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 always find it annoying when the default view of an object shows label names that don't exist as properties on the object. I.e for this, if I try and read $Team.Created
I will not get the desired result. I will then have to run $Team | Fl -Property *
to get the actual property name created_at
. Same for the updated labels below. If you want to do this, you should build the output object with these new property 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.
This is interesting feedback that I hadn't considered, and I appreciate it. I'll make that change (and change Parent
to be parent.name
).
122f86a
to
a1b68c1
Compare
/azp run PowerShellForGitHub-CI |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
#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 itsID
has been deprecated per GitHub documentation. Removed that functionality and added the ability to look up byslug
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 theslug
instead of the teamID
.New-GitHubTeam
: Added ability to pass in theParentTeamId
(also via the pipeline) to avoid the need to query through all org teams.Set-GitHubTeam
: Added ability to pass in the teamslug
(also via the pipeline) to avoid the need to query through all org teams. Similar toNew-GitHubTeam
, also added the ability to pass-in theParentTeamId
to avoid the full org team lookup.Remove-GitHubTeam
: Added ability to pass in the teamslug
(also via the pipeline) to avoid the need to query through all org teams.Added
Rename-GitHubTeam
as a helper/wrapper on top ofSet-GitHubTeam
Added additional pipeline tests for existing functions
Added new tests for
Rename-GitHubTeam
andGet-GitHubTeamMember
Small update to formatters to capitalize and simplify headers, and simplify the display of the team parent
Issues Fixed
n/a
References
GitHub Teams API
Checklist
Relevant usage examples have been added/updated in USAGE.md.If desired, ensure your name is added to our Contributors list