Skip to content

Commit

Permalink
GitHubTeams: Add New/Update/Remove Functions (#257)
Browse files Browse the repository at this point in the history
Adds the following functions:

- `Add-GitHubTeam`
- `Update-GitHubTeam`
- `Remove-GitHubTeam`

It also adds the `TeamName` parameter to the `Get-GitHubTeam` function to allow getting team details by team name, which is used by the new functions.

Pester tests have also been added for the following functions:

- `Get-GitHubTeam`
- `Add-GitHubTeam`
- `Update-GitHubTeam`
- `Remove-GitHubTeam`

Positional Binding has been set as `false` for the three functions, and `Position` attributes added to the function's mandatory parameters.

Type view formats have been added for the `GitHub.TeamSummary` and `GitHub.Team` types.

API Reference: [GitHub Teams API](https://developer.github.com/v3/teams/)
  • Loading branch information
X-Guardian authored Aug 11, 2020
1 parent 4ded2fa commit 6a51601
Show file tree
Hide file tree
Showing 5 changed files with 1,370 additions and 5 deletions.
80 changes: 80 additions & 0 deletions Formatters/GitHubTeams.Format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<ViewDefinitions>
<!--================== GitHub.TeamSummary Type View =================-->
<View>
<Name>GitHub.TeamSummary</Name>
<ViewSelectedBy>
<TypeName>GitHub.TeamSummary</TypeName>
</ViewSelectedBy>
<TableControl>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>description</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>privacy</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>permission</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>OrganizationName</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<!--================== GitHub.Team Type View =================-->
<View>
<Name>GitHub.Team</Name>
<ViewSelectedBy>
<TypeName>GitHub.Team</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>name</PropertyName>
</ListItem>
<ListItem>
<PropertyName>description</PropertyName>
</ListItem>
<ListItem>
<PropertyName>privacy</PropertyName>
</ListItem>
<ListItem>
<PropertyName>permission</PropertyName>
</ListItem>
<ListItem>
<PropertyName>created_at</PropertyName>
</ListItem>
<ListItem>
<PropertyName>updated_at</PropertyName>
</ListItem>
<ListItem>
<PropertyName>members_count</PropertyName>
</ListItem>
<ListItem>
<PropertyName>repos_count</PropertyName>
</ListItem>
<ListItem>
<PropertyName>parent</PropertyName>
</ListItem>
<ListItem>
<PropertyName>OrganizationName</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
</ViewDefinitions>
</Configuration>
Loading

0 comments on commit 6a51601

Please sign in to comment.