@@ -2267,16 +2267,7 @@ type MembershipPayload struct {
2267
2267
Type string `json:"type"`
2268
2268
SiteAdmin bool `json:"site_admin"`
2269
2269
} `json:"sender"`
2270
- Team struct {
2271
- Name string `json:"name"`
2272
- ID int64 `json:"id"`
2273
- NodeID string `json:"node_id"`
2274
- Slug string `json:"slug"`
2275
- Permission string `json:"permission"`
2276
- URL string `json:"url"`
2277
- MembersURL string `json:"members_url"`
2278
- RepositoriesURL string `json:"repositories_url"`
2279
- } `json:"team"`
2270
+ Team * Team `json:"team"`
2280
2271
Organization struct {
2281
2272
Login string `json:"login"`
2282
2273
ID int64 `json:"id"`
@@ -5693,19 +5684,8 @@ type StatusPayload struct {
5693
5684
5694
5685
// TeamPayload contains the information for GitHub's team hook event
5695
5686
type TeamPayload struct {
5696
- Action string `json:"action"`
5697
- Team struct {
5698
- Name string `json:"name"`
5699
- ID int64 `json:"id"`
5700
- NodeID string `json:"node_id"`
5701
- Slug string `json:"slug"`
5702
- Description string `json:"description"`
5703
- Privacy string `json:"privacy"`
5704
- URL string `json:"url"`
5705
- MembersURL string `json:"members_url"`
5706
- RepositoriesURL string `json:"repositories_url"`
5707
- Permission string `json:"permission"`
5708
- } `json:"team"`
5687
+ Action string `json:"action"`
5688
+ Team * Team `json:"team"`
5709
5689
Organization struct {
5710
5690
Login string `json:"login"`
5711
5691
ID int64 `json:"id"`
@@ -5744,17 +5724,7 @@ type TeamPayload struct {
5744
5724
5745
5725
// TeamAddPayload contains the information for GitHub's team_add hook event
5746
5726
type TeamAddPayload struct {
5747
- Team struct {
5748
- Name string `json:"name"`
5749
- ID int64 `json:"id"`
5750
- NodeID string `json:"node_id"`
5751
- Slug string `json:"slug"`
5752
- Description string `json:"description"`
5753
- Permission string `json:"permission"`
5754
- URL string `json:"url"`
5755
- MembersURL string `json:"members_url"`
5756
- RepositoriesURL string `json:"repositories_url"`
5757
- } `json:"team"`
5727
+ Team * Team `json:"team"`
5758
5728
Repository struct {
5759
5729
ID int64 `json:"id"`
5760
5730
NodeID string `json:"node_id"`
@@ -6126,3 +6096,16 @@ type Label struct {
6126
6096
Color string `json:"color"`
6127
6097
Default bool `json:"default"`
6128
6098
}
6099
+
6100
+ // Team contains GitHub's Team information
6101
+ type Team struct {
6102
+ Name string `json:"name"`
6103
+ ID int64 `json:"id"`
6104
+ NodeID string `json:"node_id"`
6105
+ Slug string `json:"slug"`
6106
+ Permission string `json:"permission"`
6107
+ URL string `json:"url"`
6108
+ MembersURL string `json:"members_url"`
6109
+ RepositoriesURL string `json:"repositories_url"`
6110
+ Parent * Team `json:"parent,omitempty"`
6111
+ }
0 commit comments