Skip to content

Commit 3c9941b

Browse files
fixed Milestone payload
1 parent 260574f commit 3c9941b

File tree

2 files changed

+8
-110
lines changed

2 files changed

+8
-110
lines changed

github/payload.go

Lines changed: 3 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,111 +1347,8 @@ type MilestonePayload struct {
13471347
DueOn *time.Time `json:"due_on"`
13481348
ClosedAt *time.Time `json:"closed_at"`
13491349
} `json:"milestone"`
1350-
Repository struct {
1351-
ID int64 `json:"id"`
1352-
NodeID string `json:"node_id"`
1353-
Name string `json:"name"`
1354-
FullName string `json:"full_name"`
1355-
Owner struct {
1356-
Login string `json:"login"`
1357-
ID int64 `json:"id"`
1358-
NodeID string `json:"node_id"`
1359-
AvatarURL string `json:"avatar_url"`
1360-
GravatarID string `json:"gravatar_id"`
1361-
URL string `json:"url"`
1362-
HTMLURL string `json:"html_url"`
1363-
FollowersURL string `json:"followers_url"`
1364-
FollowingURL string `json:"following_url"`
1365-
GistsURL string `json:"gists_url"`
1366-
StarredURL string `json:"starred_url"`
1367-
SubscriptionsURL string `json:"subscriptions_url"`
1368-
OrganizationsURL string `json:"organizations_url"`
1369-
ReposURL string `json:"repos_url"`
1370-
EventsURL string `json:"events_url"`
1371-
ReceivedEventsURL string `json:"received_events_url"`
1372-
Type string `json:"type"`
1373-
SiteAdmin bool `json:"site_admin"`
1374-
} `json:"owner"`
1375-
Private bool `json:"private"`
1376-
HTMLURL string `json:"html_url"`
1377-
Description *string `json:"description"`
1378-
Fork bool `json:"fork"`
1379-
URL string `json:"url"`
1380-
ForksURL string `json:"forks_url"`
1381-
KeysURL string `json:"keys_url"`
1382-
CollaboratorsURL string `json:"collaborators_url"`
1383-
TeamsURL string `json:"teams_url"`
1384-
HooksURL string `json:"hooks_url"`
1385-
IssueEventsURL string `json:"issue_events_url"`
1386-
EventsURL string `json:"events_url"`
1387-
AssigneesURL string `json:"assignees_url"`
1388-
BranchesURL string `json:"branches_url"`
1389-
TagsURL string `json:"tags_url"`
1390-
BlobsURL string `json:"blobs_url"`
1391-
GitTagsURL string `json:"git_tags_url"`
1392-
GitRefsURL string `json:"git_refs_url"`
1393-
TreesURL string `json:"trees_url"`
1394-
StatusesURL string `json:"statuses_url"`
1395-
LanguagesURL string `json:"languages_url"`
1396-
StargazersURL string `json:"stargazers_url"`
1397-
ContributorsURL string `json:"contributors_url"`
1398-
SubscribersURL string `json:"subscribers_url"`
1399-
SubscriptionURL string `json:"subscription_url"`
1400-
CommitsURL string `json:"commits_url"`
1401-
GitCommitsURL string `json:"git_commits_url"`
1402-
CommentsURL string `json:"comments_url"`
1403-
IssueCommentURL string `json:"issue_comment_url"`
1404-
ContentsURL string `json:"contents_url"`
1405-
CompareURL string `json:"compare_url"`
1406-
MergesURL string `json:"merges_url"`
1407-
ArchiveURL string `json:"archive_url"`
1408-
DownloadsURL string `json:"downloads_url"`
1409-
IssuesURL string `json:"issues_url"`
1410-
PullsURL string `json:"pulls_url"`
1411-
MilestonesURL string `json:"milestones_url"`
1412-
NotificationsURL string `json:"notifications_url"`
1413-
LabelsURL string `json:"labels_url"`
1414-
ReleasesURL string `json:"releases_url"`
1415-
DeploymentsURL string `json:"deployments_url"`
1416-
CreatedAt time.Time `json:"created_at"`
1417-
UpdatedAt time.Time `json:"updated_at"`
1418-
PushedAt time.Time `json:"pushed_at"`
1419-
GitURL string `json:"git_url"`
1420-
SSHURL string `json:"ssh_url"`
1421-
CloneURL string `json:"clone_url"`
1422-
SvnURL string `json:"svn_url"`
1423-
Homepage *string `json:"homepage"`
1424-
Size int64 `json:"size"`
1425-
StargazersCount int64 `json:"stargazers_count"`
1426-
WatchersCount int64 `json:"watchers_count"`
1427-
Language *string `json:"language"`
1428-
HasIssues bool `json:"has_issues"`
1429-
HasDownloads bool `json:"has_downloads"`
1430-
HasWiki bool `json:"has_wiki"`
1431-
HasPages bool `json:"has_pages"`
1432-
ForksCount int64 `json:"forks_count"`
1433-
MirrorURL *string `json:"mirror_url"`
1434-
OpenIssuesCount int64 `json:"open_issues_count"`
1435-
Forks int64 `json:"forks"`
1436-
OpenIssues int64 `json:"open_issues"`
1437-
Watchers int64 `json:"watchers"`
1438-
DefaultBranch string `json:"default_branch"`
1439-
} `json:"repository"`
1440-
Organization struct {
1441-
Login string `json:"login"`
1442-
ID int64 `json:"id"`
1443-
NodeID string `json:"node_id"`
1444-
URL string `json:"url"`
1445-
ReposURL string `json:"repos_url"`
1446-
EventsURL string `json:"events_url"`
1447-
HooksURL string `json:"hooks_url"`
1448-
IssuesURL string `json:"issues_url"`
1449-
MembersURL string `json:"members_url"`
1450-
PublicMembersURL string `json:"public_members_url"`
1451-
AvatarURL string `json:"avatar_url"`
1452-
Description string `json:"description"`
1453-
} `json:"organization"`
1454-
Sender struct {
1350+
Repository Repository `json:"repository"`
1351+
Sender struct {
14551352
Login string `json:"login"`
14561353
ID int64 `json:"id"`
14571354
NodeID string `json:"node_id"`
@@ -1471,6 +1368,7 @@ type MilestonePayload struct {
14711368
Type string `json:"type"`
14721369
SiteAdmin bool `json:"site_admin"`
14731370
} `json:"sender"`
1371+
Installation Installation `json:"installation"`
14741372
}
14751373

14761374
// OrganizationPayload contains the information for GitHub's organization hook event

github/payload_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ func TestPayloads(t *testing.T) {
114114
filename: "milestone.json",
115115
typ: &MilestonePayload{},
116116
},
117-
// {
118-
// name: "OrgBlockPayload",
119-
// filename: "org-block.json",
120-
// typ: &OrgBlockPayload{},
121-
// },
117+
{
118+
name: "OrgBlockPayload",
119+
filename: "org-block.json",
120+
typ: &OrgBlockPayload{},
121+
},
122122
// {
123123
// name: "OrganizationPayload",
124124
// filename: "organization.json",

0 commit comments

Comments
 (0)