Merge pull request #119 from tjrivera/child-team-payload-support
GitHub child team payload support
This commit is contained in:
+17
-34
@@ -2267,16 +2267,7 @@ type MembershipPayload struct {
|
|||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
SiteAdmin bool `json:"site_admin"`
|
SiteAdmin bool `json:"site_admin"`
|
||||||
} `json:"sender"`
|
} `json:"sender"`
|
||||||
Team struct {
|
Team *Team `json:"team"`
|
||||||
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"`
|
|
||||||
Organization struct {
|
Organization struct {
|
||||||
Login string `json:"login"`
|
Login string `json:"login"`
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
@@ -5693,19 +5684,8 @@ type StatusPayload struct {
|
|||||||
|
|
||||||
// TeamPayload contains the information for GitHub's team hook event
|
// TeamPayload contains the information for GitHub's team hook event
|
||||||
type TeamPayload struct {
|
type TeamPayload struct {
|
||||||
Action string `json:"action"`
|
Action string `json:"action"`
|
||||||
Team struct {
|
Team *Team `json:"team"`
|
||||||
Name string `json:"name"`
|
|
||||||
ID int64 `json:"id"`
|
|
||||||
NodeID string `json:"node_id"`
|
|
||||||
Slug string `json:"slug"`
|
|
||||||
Description string `json:"description"`
|
|
||||||
Privacy string `json:"privacy"`
|
|
||||||
URL string `json:"url"`
|
|
||||||
MembersURL string `json:"members_url"`
|
|
||||||
RepositoriesURL string `json:"repositories_url"`
|
|
||||||
Permission string `json:"permission"`
|
|
||||||
} `json:"team"`
|
|
||||||
Organization struct {
|
Organization struct {
|
||||||
Login string `json:"login"`
|
Login string `json:"login"`
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
@@ -5744,17 +5724,7 @@ type TeamPayload struct {
|
|||||||
|
|
||||||
// TeamAddPayload contains the information for GitHub's team_add hook event
|
// TeamAddPayload contains the information for GitHub's team_add hook event
|
||||||
type TeamAddPayload struct {
|
type TeamAddPayload struct {
|
||||||
Team struct {
|
Team *Team `json:"team"`
|
||||||
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"`
|
|
||||||
Repository struct {
|
Repository struct {
|
||||||
ID int64 `json:"id"`
|
ID int64 `json:"id"`
|
||||||
NodeID string `json:"node_id"`
|
NodeID string `json:"node_id"`
|
||||||
@@ -6126,3 +6096,16 @@ type Label struct {
|
|||||||
Color string `json:"color"`
|
Color string `json:"color"`
|
||||||
Default bool `json:"default"`
|
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"`
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user