Skip to content

Commit 5be09ce

Browse files
author
Tyler Rivera
committed
Support GitHub child teams
1 parent 7a4edfc commit 5be09ce

File tree

1 file changed

+15
-21
lines changed

1 file changed

+15
-21
lines changed

github/payload.go

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,16 +2254,7 @@ type MembershipPayload struct {
22542254
Type string `json:"type"`
22552255
SiteAdmin bool `json:"site_admin"`
22562256
} `json:"sender"`
2257-
Team struct {
2258-
Name string `json:"name"`
2259-
ID int64 `json:"id"`
2260-
NodeID string `json:"node_id"`
2261-
Slug string `json:"slug"`
2262-
Permission string `json:"permission"`
2263-
URL string `json:"url"`
2264-
MembersURL string `json:"members_url"`
2265-
RepositoriesURL string `json:"repositories_url"`
2266-
} `json:"team"`
2257+
Team *Team `json:"team"`
22672258
Organization struct {
22682259
Login string `json:"login"`
22692260
ID int64 `json:"id"`
@@ -5729,17 +5720,7 @@ type TeamPayload struct {
57295720

57305721
// TeamAddPayload contains the information for GitHub's team_add hook event
57315722
type TeamAddPayload struct {
5732-
Team struct {
5733-
Name string `json:"name"`
5734-
ID int64 `json:"id"`
5735-
NodeID string `json:"node_id"`
5736-
Slug string `json:"slug"`
5737-
Description string `json:"description"`
5738-
Permission string `json:"permission"`
5739-
URL string `json:"url"`
5740-
MembersURL string `json:"members_url"`
5741-
RepositoriesURL string `json:"repositories_url"`
5742-
} `json:"team"`
5723+
Team *Team `json:"team"`
57435724
Repository struct {
57445725
ID int64 `json:"id"`
57455726
NodeID string `json:"node_id"`
@@ -6111,3 +6092,16 @@ type Label struct {
61116092
Color string `json:"color"`
61126093
Default bool `json:"default"`
61136094
}
6095+
6096+
// Team contains GitHub's Team information
6097+
type Team struct {
6098+
Name string `json:"name"`
6099+
ID int64 `json:"id"`
6100+
NodeID string `json:"node_id"`
6101+
Slug string `json:"slug"`
6102+
Permission string `json:"permission"`
6103+
URL string `json:"url"`
6104+
MembersURL string `json:"members_url"`
6105+
RepositoriesURL string `json:"repositories_url"`
6106+
Parent *Team `json:"parent,omitempty"`
6107+
}

0 commit comments

Comments
 (0)