@@ -35,19 +35,21 @@ data RepoWebhookEvent
35
35
= WebhookWildcardEvent
36
36
| WebhookCheckRunEvent
37
37
| WebhookCheckSuiteEvent
38
+ | WebhookCodeScanningAlert
38
39
| WebhookCommitCommentEvent
39
40
| WebhookContentReferenceEvent
40
41
| WebhookCreateEvent
41
42
| WebhookDeleteEvent
42
43
| WebhookDeployKeyEvent
43
44
| WebhookDeploymentEvent
44
45
| WebhookDeploymentStatusEvent
46
+ | WebhookDiscussion
47
+ | WebhookDiscussionComment
45
48
| WebhookDownloadEvent
46
49
| WebhookFollowEvent
47
50
| WebhookForkEvent
48
- | WebhookForkApplyEvent
49
- | WebhookGitHubAppAuthorizationEvent
50
51
| WebhookGistEvent
52
+ | WebhookGitHubAppAuthorizationEvent
51
53
| WebhookGollumEvent
52
54
| WebhookInstallationEvent
53
55
| WebhookInstallationRepositoriesEvent
@@ -59,29 +61,35 @@ data RepoWebhookEvent
59
61
| WebhookMembershipEvent
60
62
| WebhookMetaEvent
61
63
| WebhookMilestoneEvent
62
- | WebhookOrganizationEvent
63
64
| WebhookOrgBlockEvent
65
+ | WebhookOrganizationEvent
66
+ | WebhookPackage
64
67
| WebhookPageBuildEvent
65
68
| WebhookPingEvent
66
69
| WebhookProjectCardEvent
67
70
| WebhookProjectColumnEvent
68
71
| WebhookProjectEvent
69
72
| WebhookPublicEvent
70
73
| WebhookPullRequestEvent
71
- | WebhookPullRequestReviewEvent
72
74
| WebhookPullRequestReviewCommentEvent
75
+ | WebhookPullRequestReviewEvent
73
76
| WebhookPushEvent
74
77
| WebhookRegistryPackageEvent
75
78
| WebhookReleaseEvent
79
+ | WebhookRepositoryDispatch
76
80
| WebhookRepositoryEvent
77
81
| WebhookRepositoryImportEvent
78
82
| WebhookRepositoryVulnerabilityAlertEvent
83
+ | WebhookSecretScanningAlert
79
84
| WebhookSecurityAdvisoryEvent
85
+ | WebhookSponsorship
80
86
| WebhookStarEvent
81
87
| WebhookStatusEvent
82
- | WebhookTeamEvent
83
88
| WebhookTeamAddEvent
89
+ | WebhookTeamEvent
84
90
| WebhookWatchEvent
91
+ | WebhookWorkflowDispatch
92
+ | WebhookWorkflowRun
85
93
deriving (Show , Data , Typeable , Eq , Ord , Generic )
86
94
87
95
instance NFData RepoWebhookEvent where rnf = genericRnf
@@ -137,19 +145,21 @@ instance FromJSON RepoWebhookEvent where
137
145
" *" -> pure WebhookWildcardEvent
138
146
" check_run" -> pure WebhookCheckRunEvent
139
147
" check_suite" -> pure WebhookCheckSuiteEvent
148
+ " code_scanning_alert" -> pure WebhookCodeScanningAlert
140
149
" commit_comment" -> pure WebhookCommitCommentEvent
141
150
" content_reference" -> pure WebhookContentReferenceEvent
142
151
" create" -> pure WebhookCreateEvent
143
152
" delete" -> pure WebhookDeleteEvent
144
153
" deploy_key" -> pure WebhookDeployKeyEvent
145
154
" deployment" -> pure WebhookDeploymentEvent
146
155
" deployment_status" -> pure WebhookDeploymentStatusEvent
156
+ " discussion" -> pure WebhookDiscussion
157
+ " discussion_comment" -> pure WebhookDiscussionComment
147
158
" download" -> pure WebhookDownloadEvent
148
159
" follow" -> pure WebhookFollowEvent
149
160
" fork" -> pure WebhookForkEvent
150
- " fork_apply" -> pure WebhookForkApplyEvent
151
- " github_app_authorization" -> pure WebhookGitHubAppAuthorizationEvent
152
161
" gist" -> pure WebhookGistEvent
162
+ " github_app_authorization" -> pure WebhookGitHubAppAuthorizationEvent
153
163
" gollum" -> pure WebhookGollumEvent
154
164
" installation" -> pure WebhookInstallationEvent
155
165
" installation_repositories" -> pure WebhookInstallationRepositoriesEvent
@@ -161,13 +171,14 @@ instance FromJSON RepoWebhookEvent where
161
171
" membership" -> pure WebhookMembershipEvent
162
172
" meta" -> pure WebhookMetaEvent
163
173
" milestone" -> pure WebhookMilestoneEvent
164
- " organization" -> pure WebhookOrganizationEvent
165
174
" org_block" -> pure WebhookOrgBlockEvent
175
+ " organization" -> pure WebhookOrganizationEvent
176
+ " package" -> pure WebhookPackage
166
177
" page_build" -> pure WebhookPageBuildEvent
167
178
" ping" -> pure WebhookPingEvent
179
+ " project" -> pure WebhookProjectEvent
168
180
" project_card" -> pure WebhookProjectCardEvent
169
181
" project_column" -> pure WebhookProjectColumnEvent
170
- " project" -> pure WebhookProjectEvent
171
182
" public" -> pure WebhookPublicEvent
172
183
" pull_request" -> pure WebhookPullRequestEvent
173
184
" pull_request_review" -> pure WebhookPullRequestReviewEvent
@@ -176,33 +187,40 @@ instance FromJSON RepoWebhookEvent where
176
187
" registry_package" -> pure WebhookRegistryPackageEvent
177
188
" release" -> pure WebhookReleaseEvent
178
189
" repository" -> pure WebhookRepositoryEvent
190
+ " repository_dispatch" -> pure WebhookRepositoryDispatch
179
191
" repository_import" -> pure WebhookRepositoryImportEvent
180
192
" repository_vulnerability_alert" -> pure WebhookRepositoryVulnerabilityAlertEvent
193
+ " secret_scanning_alert" -> pure WebhookSecretScanningAlert
181
194
" security_advisory" -> pure WebhookSecurityAdvisoryEvent
195
+ " sponsorship" -> pure WebhookSponsorship
182
196
" star" -> pure WebhookStarEvent
183
197
" status" -> pure WebhookStatusEvent
184
198
" team" -> pure WebhookTeamEvent
185
199
" team_add" -> pure WebhookTeamAddEvent
186
200
" watch" -> pure WebhookWatchEvent
201
+ " workflow_dispatch" -> pure WebhookWorkflowDispatch
202
+ " workflow_run" -> pure WebhookWorkflowRun
187
203
_ -> fail $ " Unknown RepoWebhookEvent: " <> T. unpack t
188
204
189
205
instance ToJSON RepoWebhookEvent where
190
206
toJSON WebhookWildcardEvent = String " *"
191
207
toJSON WebhookCheckRunEvent = String " check_run"
192
208
toJSON WebhookCheckSuiteEvent = String " check_suite"
209
+ toJSON WebhookCodeScanningAlert = String " code_scanning_alert"
193
210
toJSON WebhookCommitCommentEvent = String " commit_comment"
194
211
toJSON WebhookContentReferenceEvent = String " content_reference"
195
212
toJSON WebhookCreateEvent = String " create"
196
213
toJSON WebhookDeleteEvent = String " delete"
197
214
toJSON WebhookDeployKeyEvent = String " deploy_key"
198
215
toJSON WebhookDeploymentEvent = String " deployment"
199
216
toJSON WebhookDeploymentStatusEvent = String " deployment_status"
217
+ toJSON WebhookDiscussion = String " discussion"
218
+ toJSON WebhookDiscussionComment = String " discussion_comment"
200
219
toJSON WebhookDownloadEvent = String " download"
201
220
toJSON WebhookFollowEvent = String " follow"
202
221
toJSON WebhookForkEvent = String " fork"
203
- toJSON WebhookForkApplyEvent = String " fork_apply"
204
- toJSON WebhookGitHubAppAuthorizationEvent = String " github_app_authorization"
205
222
toJSON WebhookGistEvent = String " gist"
223
+ toJSON WebhookGitHubAppAuthorizationEvent = String " github_app_authorization"
206
224
toJSON WebhookGollumEvent = String " gollum"
207
225
toJSON WebhookInstallationEvent = String " installation"
208
226
toJSON WebhookInstallationRepositoriesEvent = String " installation_repositories"
@@ -214,29 +232,35 @@ instance ToJSON RepoWebhookEvent where
214
232
toJSON WebhookMembershipEvent = String " membership"
215
233
toJSON WebhookMetaEvent = String " meta"
216
234
toJSON WebhookMilestoneEvent = String " milestone"
217
- toJSON WebhookOrganizationEvent = String " organization"
218
235
toJSON WebhookOrgBlockEvent = String " org_block"
236
+ toJSON WebhookOrganizationEvent = String " organization"
237
+ toJSON WebhookPackage = String " package"
219
238
toJSON WebhookPageBuildEvent = String " page_build"
220
239
toJSON WebhookPingEvent = String " ping"
221
240
toJSON WebhookProjectCardEvent = String " project_card"
222
241
toJSON WebhookProjectColumnEvent = String " project_column"
223
242
toJSON WebhookProjectEvent = String " project"
224
243
toJSON WebhookPublicEvent = String " public"
225
244
toJSON WebhookPullRequestEvent = String " pull_request"
226
- toJSON WebhookPullRequestReviewEvent = String " pull_request_review"
227
245
toJSON WebhookPullRequestReviewCommentEvent = String " pull_request_review_comment"
246
+ toJSON WebhookPullRequestReviewEvent = String " pull_request_review"
228
247
toJSON WebhookPushEvent = String " push"
229
248
toJSON WebhookRegistryPackageEvent = String " registry_package"
230
249
toJSON WebhookReleaseEvent = String " release"
250
+ toJSON WebhookRepositoryDispatch = String " repository_dispatch"
231
251
toJSON WebhookRepositoryEvent = String " repository"
232
252
toJSON WebhookRepositoryImportEvent = String " repository_import"
233
253
toJSON WebhookRepositoryVulnerabilityAlertEvent = String " repository_vulnerability_alert"
254
+ toJSON WebhookSecretScanningAlert = String " secret_scanning_alert"
234
255
toJSON WebhookSecurityAdvisoryEvent = String " security_advisory"
256
+ toJSON WebhookSponsorship = String " sponsorship"
235
257
toJSON WebhookStarEvent = String " star"
236
258
toJSON WebhookStatusEvent = String " status"
237
- toJSON WebhookTeamEvent = String " team"
238
259
toJSON WebhookTeamAddEvent = String " team_add"
260
+ toJSON WebhookTeamEvent = String " team"
239
261
toJSON WebhookWatchEvent = String " watch"
262
+ toJSON WebhookWorkflowDispatch = String " workflow_dispatch"
263
+ toJSON WebhookWorkflowRun = String " workflow_run"
240
264
241
265
instance FromJSON RepoWebhook where
242
266
parseJSON = withObject " RepoWebhook" $ \ o -> RepoWebhook
0 commit comments