@@ -31,26 +31,52 @@ instance Binary RepoWebhook
31
31
32
32
data RepoWebhookEvent
33
33
= WebhookWildcardEvent
34
+ | WebhookCheckRunEvent
35
+ | WebhookCheckSuiteEvent
34
36
| WebhookCommitCommentEvent
37
+ | WebhookContentReferenceEvent
35
38
| WebhookCreateEvent
36
39
| WebhookDeleteEvent
40
+ | WebhookDeployKeyEvent
37
41
| WebhookDeploymentEvent
38
42
| WebhookDeploymentStatusEvent
43
+ | WebhookDownloadEvent
44
+ | WebhookFollowEvent
39
45
| WebhookForkEvent
46
+ | WebhookForkApplyEvent
47
+ | WebhookGitHubAppAuthorizationEvent
48
+ | WebhookGistEvent
40
49
| WebhookGollumEvent
41
50
| WebhookInstallationEvent
42
51
| WebhookInstallationRepositoriesEvent
43
52
| WebhookIssueCommentEvent
44
53
| WebhookIssuesEvent
54
+ | WebhookLabelEvent
55
+ | WebhookMarketplacePurchaseEvent
45
56
| WebhookMemberEvent
57
+ | WebhookMembershipEvent
58
+ | WebhookMetaEvent
59
+ | WebhookMilestoneEvent
60
+ | WebhookOrganizationEvent
61
+ | WebhookOrgBlockEvent
46
62
| WebhookPageBuildEvent
47
63
| WebhookPingEvent
64
+ | WebhookProjectCardEvent
65
+ | WebhookProjectColumnEvent
66
+ | WebhookProjectEvent
48
67
| WebhookPublicEvent
49
- | WebhookPullRequestReviewCommentEvent
50
68
| WebhookPullRequestEvent
69
+ | WebhookPullRequestReviewEvent
70
+ | WebhookPullRequestReviewCommentEvent
51
71
| WebhookPushEvent
52
72
| WebhookReleaseEvent
73
+ | WebhookRepositoryEvent
74
+ | WebhookRepositoryImportEvent
75
+ | WebhookRepositoryVulnerabilityAlertEvent
76
+ | WebhookSecurityAdvisoryEvent
77
+ | WebhookStarEvent
53
78
| WebhookStatusEvent
79
+ | WebhookTeamEvent
54
80
| WebhookTeamAddEvent
55
81
| WebhookWatchEvent
56
82
deriving (Show , Data , Typeable , Eq , Ord , Generic )
@@ -105,54 +131,106 @@ instance Binary EditRepoWebhook
105
131
106
132
instance FromJSON RepoWebhookEvent where
107
133
parseJSON (String " *" ) = pure WebhookWildcardEvent
134
+ parseJSON (String " check_run" ) = pure WebhookCheckRunEvent
135
+ parseJSON (String " check_suite" ) = pure WebhookCheckSuiteEvent
108
136
parseJSON (String " commit_comment" ) = pure WebhookCommitCommentEvent
137
+ parseJSON (String " content_reference" ) = pure WebhookContentReferenceEvent
109
138
parseJSON (String " create" ) = pure WebhookCreateEvent
110
139
parseJSON (String " delete" ) = pure WebhookDeleteEvent
140
+ parseJSON (String " deploy_key" ) = pure WebhookDeployKeyEvent
111
141
parseJSON (String " deployment" ) = pure WebhookDeploymentEvent
112
142
parseJSON (String " deployment_status" ) = pure WebhookDeploymentStatusEvent
143
+ parseJSON (String " download" ) = pure WebhookDownloadEvent
144
+ parseJSON (String " follow" ) = pure WebhookFollowEvent
113
145
parseJSON (String " fork" ) = pure WebhookForkEvent
146
+ parseJSON (String " fork_apply" ) = pure WebhookForkApplyEvent
147
+ parseJSON (String " github_app_authorization" ) = pure WebhookGitHubAppAuthorizationEvent
148
+ parseJSON (String " gist" ) = pure WebhookGistEvent
114
149
parseJSON (String " gollum" ) = pure WebhookGollumEvent
115
150
parseJSON (String " installation" ) = pure WebhookInstallationEvent
116
151
parseJSON (String " installation_repositories" ) = pure WebhookInstallationRepositoriesEvent
117
152
parseJSON (String " issue_comment" ) = pure WebhookIssueCommentEvent
118
153
parseJSON (String " issues" ) = pure WebhookIssuesEvent
154
+ parseJSON (String " label" ) = pure WebhookLabelEvent
155
+ parseJSON (String " marketplace_purchase" ) = pure WebhookMarketplacePurchaseEvent
119
156
parseJSON (String " member" ) = pure WebhookMemberEvent
157
+ parseJSON (String " membership" ) = pure WebhookMembershipEvent
158
+ parseJSON (String " meta" ) = pure WebhookMetaEvent
159
+ parseJSON (String " milestone" ) = pure WebhookMilestoneEvent
160
+ parseJSON (String " organization" ) = pure WebhookOrganizationEvent
161
+ parseJSON (String " org_block" ) = pure WebhookOrgBlockEvent
120
162
parseJSON (String " page_build" ) = pure WebhookPageBuildEvent
121
163
parseJSON (String " ping" ) = pure WebhookPingEvent
164
+ parseJSON (String " project_card" ) = pure WebhookProjectCardEvent
165
+ parseJSON (String " project_column" ) = pure WebhookProjectColumnEvent
166
+ parseJSON (String " project" ) = pure WebhookProjectEvent
122
167
parseJSON (String " public" ) = pure WebhookPublicEvent
123
- parseJSON (String " pull_request_review_comment" ) = pure WebhookPullRequestReviewCommentEvent
124
168
parseJSON (String " pull_request" ) = pure WebhookPullRequestEvent
169
+ parseJSON (String " pull_request_review" ) = pure WebhookPullRequestReviewEvent
170
+ parseJSON (String " pull_request_review_comment" ) = pure WebhookPullRequestReviewCommentEvent
125
171
parseJSON (String " push" ) = pure WebhookPushEvent
126
172
parseJSON (String " release" ) = pure WebhookReleaseEvent
173
+ parseJSON (String " repository" ) = pure WebhookRepositoryEvent
174
+ parseJSON (String " repository_import" ) = pure WebhookRepositoryImportEvent
175
+ parseJSON (String " repository_vulnerability_alert" ) = pure WebhookRepositoryVulnerabilityAlertEvent
176
+ parseJSON (String " security_advisory" ) = pure WebhookSecurityAdvisoryEvent
177
+ parseJSON (String " star" ) = pure WebhookStarEvent
127
178
parseJSON (String " status" ) = pure WebhookStatusEvent
179
+ parseJSON (String " team" ) = pure WebhookTeamEvent
128
180
parseJSON (String " team_add" ) = pure WebhookTeamAddEvent
129
181
parseJSON (String " watch" ) = pure WebhookWatchEvent
130
182
parseJSON _ = fail " Could not build a Webhook event"
131
183
132
184
instance ToJSON RepoWebhookEvent where
133
- toJSON WebhookWildcardEvent = String " *"
134
- toJSON WebhookCommitCommentEvent = String " commit_comment"
135
- toJSON WebhookCreateEvent = String " create"
136
- toJSON WebhookDeleteEvent = String " delete"
137
- toJSON WebhookDeploymentEvent = String " deployment"
138
- toJSON WebhookDeploymentStatusEvent = String " deployment_status"
139
- toJSON WebhookForkEvent = String " fork"
140
- toJSON WebhookGollumEvent = String " gollum"
141
- toJSON WebhookInstallationEvent = String " installation"
142
- toJSON WebhookInstallationRepositoriesEvent = String " installation_repositories"
143
- toJSON WebhookIssueCommentEvent = String " issue_comment"
144
- toJSON WebhookIssuesEvent = String " issues"
145
- toJSON WebhookMemberEvent = String " member"
146
- toJSON WebhookPageBuildEvent = String " page_build"
147
- toJSON WebhookPingEvent = String " ping"
148
- toJSON WebhookPublicEvent = String " public"
149
- toJSON WebhookPullRequestReviewCommentEvent = String " pull_request_review_comment"
150
- toJSON WebhookPullRequestEvent = String " pull_request"
151
- toJSON WebhookPushEvent = String " push"
152
- toJSON WebhookReleaseEvent = String " release"
153
- toJSON WebhookStatusEvent = String " status"
154
- toJSON WebhookTeamAddEvent = String " team_add"
155
- toJSON WebhookWatchEvent = String " watch"
185
+ toJSON WebhookWildcardEvent = String " *"
186
+ toJSON WebhookCheckRunEvent = String " check_run"
187
+ toJSON WebhookCheckSuiteEvent = String " check_suite"
188
+ toJSON WebhookCommitCommentEvent = String " commit_comment"
189
+ toJSON WebhookContentReferenceEvent = String " content_reference"
190
+ toJSON WebhookCreateEvent = String " create"
191
+ toJSON WebhookDeleteEvent = String " delete"
192
+ toJSON WebhookDeployKeyEvent = String " deploy_key"
193
+ toJSON WebhookDeploymentEvent = String " deployment"
194
+ toJSON WebhookDeploymentStatusEvent = String " deployment_status"
195
+ toJSON WebhookDownloadEvent = String " download"
196
+ toJSON WebhookFollowEvent = String " follow"
197
+ toJSON WebhookForkEvent = String " fork"
198
+ toJSON WebhookForkApplyEvent = String " fork_apply"
199
+ toJSON WebhookGitHubAppAuthorizationEvent = String " github_app_authorization"
200
+ toJSON WebhookGistEvent = String " gist"
201
+ toJSON WebhookGollumEvent = String " gollum"
202
+ toJSON WebhookInstallationEvent = String " installation"
203
+ toJSON WebhookInstallationRepositoriesEvent = String " installation_repositories"
204
+ toJSON WebhookIssueCommentEvent = String " issue_comment"
205
+ toJSON WebhookIssuesEvent = String " issues"
206
+ toJSON WebhookLabelEvent = String " label"
207
+ toJSON WebhookMarketplacePurchaseEvent = String " marketplace_purchase"
208
+ toJSON WebhookMemberEvent = String " member"
209
+ toJSON WebhookMembershipEvent = String " membership"
210
+ toJSON WebhookMetaEvent = String " meta"
211
+ toJSON WebhookMilestoneEvent = String " milestone"
212
+ toJSON WebhookOrganizationEvent = String " organization"
213
+ toJSON WebhookOrgBlockEvent = String " org_block"
214
+ toJSON WebhookPageBuildEvent = String " page_build"
215
+ toJSON WebhookPingEvent = String " ping"
216
+ toJSON WebhookProjectCardEvent = String " project_card"
217
+ toJSON WebhookProjectColumnEvent = String " project_column"
218
+ toJSON WebhookProjectEvent = String " project"
219
+ toJSON WebhookPublicEvent = String " public"
220
+ toJSON WebhookPullRequestEvent = String " pull_request"
221
+ toJSON WebhookPullRequestReviewEvent = String " pull_request_review"
222
+ toJSON WebhookPullRequestReviewCommentEvent = String " pull_request_review_comment"
223
+ toJSON WebhookPushEvent = String " push"
224
+ toJSON WebhookReleaseEvent = String " release"
225
+ toJSON WebhookRepositoryEvent = String " repository"
226
+ toJSON WebhookRepositoryImportEvent = String " repository_import"
227
+ toJSON WebhookRepositoryVulnerabilityAlertEvent = String " repository_vulnerability_alert"
228
+ toJSON WebhookSecurityAdvisoryEvent = String " security_advisory"
229
+ toJSON WebhookStarEvent = String " star"
230
+ toJSON WebhookStatusEvent = String " status"
231
+ toJSON WebhookTeamEvent = String " team"
232
+ toJSON WebhookTeamAddEvent = String " team_add"
233
+ toJSON WebhookWatchEvent = String " watch"
156
234
157
235
instance FromJSON RepoWebhook where
158
236
parseJSON = withObject " RepoWebhook" $ \ o -> RepoWebhook
0 commit comments