Skip to content

Commit d293582

Browse files
committed
Add WebhookRegistryPackageEvent
1 parent 2f06754 commit d293582

File tree

1 file changed

+51
-48
lines changed

1 file changed

+51
-48
lines changed

src/GitHub/Data/Webhooks.hs

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ data RepoWebhookEvent
7070
| WebhookPullRequestReviewEvent
7171
| WebhookPullRequestReviewCommentEvent
7272
| WebhookPushEvent
73+
| WebhookRegistryPackageEvent
7374
| WebhookReleaseEvent
7475
| WebhookRepositoryEvent
7576
| WebhookRepositoryImportEvent
@@ -131,55 +132,56 @@ instance Binary EditRepoWebhook
131132
-- JSON instances
132133

133134
instance FromJSON RepoWebhookEvent where
134-
parseJSON (String "*") = pure WebhookWildcardEvent
135-
parseJSON (String "check_run") = pure WebhookCheckRunEvent
136-
parseJSON (String "check_suite") = pure WebhookCheckSuiteEvent
137-
parseJSON (String "commit_comment") = pure WebhookCommitCommentEvent
138-
parseJSON (String "content_reference") = pure WebhookContentReferenceEvent
139-
parseJSON (String "create") = pure WebhookCreateEvent
140-
parseJSON (String "delete") = pure WebhookDeleteEvent
141-
parseJSON (String "deploy_key") = pure WebhookDeployKeyEvent
142-
parseJSON (String "deployment") = pure WebhookDeploymentEvent
143-
parseJSON (String "deployment_status") = pure WebhookDeploymentStatusEvent
144-
parseJSON (String "download") = pure WebhookDownloadEvent
145-
parseJSON (String "follow") = pure WebhookFollowEvent
146-
parseJSON (String "fork") = pure WebhookForkEvent
147-
parseJSON (String "fork_apply") = pure WebhookForkApplyEvent
148-
parseJSON (String "github_app_authorization") = pure WebhookGitHubAppAuthorizationEvent
149-
parseJSON (String "gist") = pure WebhookGistEvent
150-
parseJSON (String "gollum") = pure WebhookGollumEvent
151-
parseJSON (String "installation") = pure WebhookInstallationEvent
152-
parseJSON (String "installation_repositories") = pure WebhookInstallationRepositoriesEvent
153-
parseJSON (String "issue_comment") = pure WebhookIssueCommentEvent
154-
parseJSON (String "issues") = pure WebhookIssuesEvent
155-
parseJSON (String "label") = pure WebhookLabelEvent
156-
parseJSON (String "marketplace_purchase") = pure WebhookMarketplacePurchaseEvent
157-
parseJSON (String "member") = pure WebhookMemberEvent
158-
parseJSON (String "membership") = pure WebhookMembershipEvent
159-
parseJSON (String "meta") = pure WebhookMetaEvent
160-
parseJSON (String "milestone") = pure WebhookMilestoneEvent
161-
parseJSON (String "organization") = pure WebhookOrganizationEvent
162-
parseJSON (String "org_block") = pure WebhookOrgBlockEvent
163-
parseJSON (String "page_build") = pure WebhookPageBuildEvent
164-
parseJSON (String "ping") = pure WebhookPingEvent
165-
parseJSON (String "project_card") = pure WebhookProjectCardEvent
166-
parseJSON (String "project_column") = pure WebhookProjectColumnEvent
167-
parseJSON (String "project") = pure WebhookProjectEvent
168-
parseJSON (String "public") = pure WebhookPublicEvent
169-
parseJSON (String "pull_request") = pure WebhookPullRequestEvent
170-
parseJSON (String "pull_request_review") = pure WebhookPullRequestReviewEvent
171-
parseJSON (String "pull_request_review_comment") = pure WebhookPullRequestReviewCommentEvent
172-
parseJSON (String "push") = pure WebhookPushEvent
173-
parseJSON (String "release") = pure WebhookReleaseEvent
174-
parseJSON (String "repository") = pure WebhookRepositoryEvent
175-
parseJSON (String "repository_import") = pure WebhookRepositoryImportEvent
135+
parseJSON (String "*") = pure WebhookWildcardEvent
136+
parseJSON (String "check_run") = pure WebhookCheckRunEvent
137+
parseJSON (String "check_suite") = pure WebhookCheckSuiteEvent
138+
parseJSON (String "commit_comment") = pure WebhookCommitCommentEvent
139+
parseJSON (String "content_reference") = pure WebhookContentReferenceEvent
140+
parseJSON (String "create") = pure WebhookCreateEvent
141+
parseJSON (String "delete") = pure WebhookDeleteEvent
142+
parseJSON (String "deploy_key") = pure WebhookDeployKeyEvent
143+
parseJSON (String "deployment") = pure WebhookDeploymentEvent
144+
parseJSON (String "deployment_status") = pure WebhookDeploymentStatusEvent
145+
parseJSON (String "download") = pure WebhookDownloadEvent
146+
parseJSON (String "follow") = pure WebhookFollowEvent
147+
parseJSON (String "fork") = pure WebhookForkEvent
148+
parseJSON (String "fork_apply") = pure WebhookForkApplyEvent
149+
parseJSON (String "github_app_authorization") = pure WebhookGitHubAppAuthorizationEvent
150+
parseJSON (String "gist") = pure WebhookGistEvent
151+
parseJSON (String "gollum") = pure WebhookGollumEvent
152+
parseJSON (String "installation") = pure WebhookInstallationEvent
153+
parseJSON (String "installation_repositories") = pure WebhookInstallationRepositoriesEvent
154+
parseJSON (String "issue_comment") = pure WebhookIssueCommentEvent
155+
parseJSON (String "issues") = pure WebhookIssuesEvent
156+
parseJSON (String "label") = pure WebhookLabelEvent
157+
parseJSON (String "marketplace_purchase") = pure WebhookMarketplacePurchaseEvent
158+
parseJSON (String "member") = pure WebhookMemberEvent
159+
parseJSON (String "membership") = pure WebhookMembershipEvent
160+
parseJSON (String "meta") = pure WebhookMetaEvent
161+
parseJSON (String "milestone") = pure WebhookMilestoneEvent
162+
parseJSON (String "organization") = pure WebhookOrganizationEvent
163+
parseJSON (String "org_block") = pure WebhookOrgBlockEvent
164+
parseJSON (String "page_build") = pure WebhookPageBuildEvent
165+
parseJSON (String "ping") = pure WebhookPingEvent
166+
parseJSON (String "project_card") = pure WebhookProjectCardEvent
167+
parseJSON (String "project_column") = pure WebhookProjectColumnEvent
168+
parseJSON (String "project") = pure WebhookProjectEvent
169+
parseJSON (String "public") = pure WebhookPublicEvent
170+
parseJSON (String "pull_request") = pure WebhookPullRequestEvent
171+
parseJSON (String "pull_request_review") = pure WebhookPullRequestReviewEvent
172+
parseJSON (String "pull_request_review_comment") = pure WebhookPullRequestReviewCommentEvent
173+
parseJSON (String "push") = pure WebhookPushEvent
174+
parseJSON (String "registry_package") = pure WebhookRegistryPackageEvent
175+
parseJSON (String "release") = pure WebhookReleaseEvent
176+
parseJSON (String "repository") = pure WebhookRepositoryEvent
177+
parseJSON (String "repository_import") = pure WebhookRepositoryImportEvent
176178
parseJSON (String "repository_vulnerability_alert") = pure WebhookRepositoryVulnerabilityAlertEvent
177-
parseJSON (String "security_advisory") = pure WebhookSecurityAdvisoryEvent
178-
parseJSON (String "star") = pure WebhookStarEvent
179-
parseJSON (String "status") = pure WebhookStatusEvent
180-
parseJSON (String "team") = pure WebhookTeamEvent
181-
parseJSON (String "team_add") = pure WebhookTeamAddEvent
182-
parseJSON (String "watch") = pure WebhookWatchEvent
179+
parseJSON (String "security_advisory") = pure WebhookSecurityAdvisoryEvent
180+
parseJSON (String "star") = pure WebhookStarEvent
181+
parseJSON (String "status") = pure WebhookStatusEvent
182+
parseJSON (String "team") = pure WebhookTeamEvent
183+
parseJSON (String "team_add") = pure WebhookTeamAddEvent
184+
parseJSON (String "watch") = pure WebhookWatchEvent
183185
parseJSON _ = fail "Could not build a Webhook event"
184186

185187
instance ToJSON RepoWebhookEvent where
@@ -222,6 +224,7 @@ instance ToJSON RepoWebhookEvent where
222224
toJSON WebhookPullRequestReviewEvent = String "pull_request_review"
223225
toJSON WebhookPullRequestReviewCommentEvent = String "pull_request_review_comment"
224226
toJSON WebhookPushEvent = String "push"
227+
toJSON WebhookRegistryPackageEvent = String "registry_package"
225228
toJSON WebhookReleaseEvent = String "release"
226229
toJSON WebhookRepositoryEvent = String "repository"
227230
toJSON WebhookRepositoryImportEvent = String "repository_import"

0 commit comments

Comments
 (0)