Skip to content

Commit

Permalink
Support GitHub child teams
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Rivera committed May 13, 2020
1 parent 7a4edfc commit 5be09ce
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions github/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -2254,16 +2254,7 @@ type MembershipPayload struct {
Type string `json:"type"`
SiteAdmin bool `json:"site_admin"`
} `json:"sender"`
Team struct {
Name string `json:"name"`
ID int64 `json:"id"`
NodeID string `json:"node_id"`
Slug string `json:"slug"`
Permission string `json:"permission"`
URL string `json:"url"`
MembersURL string `json:"members_url"`
RepositoriesURL string `json:"repositories_url"`
} `json:"team"`
Team *Team `json:"team"`
Organization struct {
Login string `json:"login"`
ID int64 `json:"id"`
Expand Down Expand Up @@ -5729,17 +5720,7 @@ type TeamPayload struct {

// TeamAddPayload contains the information for GitHub's team_add hook event
type TeamAddPayload struct {
Team struct {
Name string `json:"name"`
ID int64 `json:"id"`
NodeID string `json:"node_id"`
Slug string `json:"slug"`
Description string `json:"description"`
Permission string `json:"permission"`
URL string `json:"url"`
MembersURL string `json:"members_url"`
RepositoriesURL string `json:"repositories_url"`
} `json:"team"`
Team *Team `json:"team"`
Repository struct {
ID int64 `json:"id"`
NodeID string `json:"node_id"`
Expand Down Expand Up @@ -6111,3 +6092,16 @@ type Label struct {
Color string `json:"color"`
Default bool `json:"default"`
}

// Team contains GitHub's Team information
type Team struct {
Name string `json:"name"`
ID int64 `json:"id"`
NodeID string `json:"node_id"`
Slug string `json:"slug"`
Permission string `json:"permission"`
URL string `json:"url"`
MembersURL string `json:"members_url"`
RepositoriesURL string `json:"repositories_url"`
Parent *Team `json:"parent,omitempty"`
}

0 comments on commit 5be09ce

Please sign in to comment.