Skip to content

Commit

Permalink
build: known webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Octokit Bot authored and gr2m committed Apr 19, 2019
1 parent d9996b3 commit 0ec1574
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 7 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ If there are actions for a webhook, events are emitted for both, the webhook nam
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#contentreferenceevent"><code>content_reference</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#createevent"><code>create</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deleteevent"><code>delete</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploykeyevent"><code>deploy_key</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploymentevent"><code>deployment</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploymentstatusevent"><code>deployment_status</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#forkevent"><code>fork</code></a></td><td class="actions-td td_num"></td></tr>
Expand All @@ -516,28 +517,30 @@ If there are actions for a webhook, events are emitted for both, the webhook nam
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#installationevent"><code>installation</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>new_permissions_accepted</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent"><code>installation_repositories</code></a></td><td class="actions-td td_text"><code>added</code><br><code>removed</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#issuecommentevent"><code>issue_comment</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#issuesevent"><code>issues</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>deleted</code><br><code>demilestoned</code><br><code>edited</code><br><code>labeled</code><br><code>milestoned</code><br><code>opened</code><br><code>pinned</code><br><code>reopened</code><br><code>transferred</code><br><code>unassigned</code><br><code>unlabeled</code><br><code>unpinned</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#issuesevent"><code>issues</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>deleted</code><br><code>demilestoned</code><br><code>edited</code><br><code>labeled</code><br><code>locked</code><br><code>milestoned</code><br><code>opened</code><br><code>pinned</code><br><code>reopened</code><br><code>transferred</code><br><code>unassigned</code><br><code>unlabeled</code><br><code>unlocked</code><br><code>unpinned</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#labelevent"><code>label</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#marketplacepurchaseevent"><code>marketplace_purchase</code></a></td><td class="actions-td td_text"><code>cancelled</code><br><code>changed</code><br><code>pending_change</code><br><code>pending_change_cancelled</code><br><code>purchased</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#memberevent"><code>member</code></a></td><td class="actions-td td_text"><code>added</code><br><code>deleted</code><br><code>edited</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#membershipevent"><code>membership</code></a></td><td class="actions-td td_text"><code>added</code><br><code>removed</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#metaevent"><code>meta</code></a></td><td class="actions-td td_text"><code>deleted</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#milestoneevent"><code>milestone</code></a></td><td class="actions-td td_text"><code>closed</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>opened</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#organizationevent"><code>organization</code></a></td><td class="actions-td td_text"><code>member_added</code><br><code>member_invited</code><br><code>member_removed</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#organizationevent"><code>organization</code></a></td><td class="actions-td td_text"><code>deleted</code><br><code>member_added</code><br><code>member_invited</code><br><code>member_removed</code><br><code>renamed</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#orgblockevent"><code>org_block</code></a></td><td class="actions-td td_text"><code>blocked</code><br><code>unblocked</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pagebuildevent"><code>page_build</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectcardevent"><code>project_card</code></a></td><td class="actions-td td_text"><code>converted</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>moved</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectcolumnevent"><code>project_column</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>moved</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectevent"><code>project</code></a></td><td class="actions-td td_text"><code>closed</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>reopened</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#publicevent"><code>public</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestevent"><code>pull_request</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>edited</code><br><code>labeled</code><br><code>opened</code><br><code>ready_for_review</code><br><code>reopened</code><br><code>review_request_removed</code><br><code>review_requested</code><br><code>unassigned</code><br><code>unlabeled</code><br><code>synchronize</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestevent"><code>pull_request</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>edited</code><br><code>labeled</code><br><code>locked</code><br><code>opened</code><br><code>ready_for_review</code><br><code>reopened</code><br><code>review_request_removed</code><br><code>review_requested</code><br><code>unassigned</code><br><code>unlabeled</code><br><code>unlocked</code><br><code>synchronize</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent"><code>pull_request_review</code></a></td><td class="actions-td td_text"><code>dismissed</code><br><code>edited</code><br><code>submitted</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent"><code>pull_request_review_comment</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pushevent"><code>push</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#releaseevent"><code>release</code></a></td><td class="actions-td td_text"><code>published</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryevent"><code>repository</code></a></td><td class="actions-td td_text"><code>archived</code><br><code>created</code><br><code>deleted</code><br><code>privatized</code><br><code>publicized</code><br><code>unarchived</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#releaseevent"><code>release</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>prereleased</code><br><code>published</code><br><code>unpublished</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryevent"><code>repository</code></a></td><td class="actions-td td_text"><code>archived</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>privatized</code><br><code>publicized</code><br><code>renamed</code><br><code>transferred</code><br><code>unarchived</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryimportevent"><code>repository_import</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryvulnerabilityalertevent"><code>repository_vulnerability_alert</code></a></td><td class="actions-td td_text"><code>create</code><br><code>dismiss</code><br><code>resolve</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#securityadvisoryevent"><code>security_advisory</code></a></td><td class="actions-td td_text"><code>performed</code><br><code>published</code><br><code>updated</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#starevent"><code>star</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#statusevent"><code>status</code></a></td><td class="actions-td td_num"></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#teamevent"><code>team</code></a></td><td class="actions-td td_text"><code>added_to_repository</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>removed_from_repository</code></td></tr>
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#teamaddevent"><code>team_add</code></a></td><td class="actions-td td_num"></td></tr>
Expand Down
144 changes: 142 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,32 @@ declare namespace Webhooks {
repository: PayloadRepository;
sender: WebhookPayloadStatusSender;
};
type WebhookPayloadStarSender = {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
};
type WebhookPayloadStar = {
action: string;
starred_at: string;
repository: PayloadRepository;
sender: WebhookPayloadStarSender;
};
type WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion = {
identifier: string;
};
Expand Down Expand Up @@ -2096,6 +2122,48 @@ declare namespace Webhooks {
repository: PayloadRepository;
sender: WebhookPayloadMilestoneSender;
};
type WebhookPayloadMetaSender = {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
};
type WebhookPayloadMetaHookConfig = {
content_type: string;
insecure_ssl: string;
url: string;
};
type WebhookPayloadMetaHook = {
type: string;
id: number;
name: string;
active: boolean;
events: Array<string>;
config: WebhookPayloadMetaHookConfig;
updated_at: string;
created_at: string;
};
type WebhookPayloadMeta = {
action: string;
hook_id: number;
hook: WebhookPayloadMetaHook;
repository: PayloadRepository;
sender: WebhookPayloadMetaSender;
};
type WebhookPayloadMembershipOrganization = {
login: string;
id: number;
Expand Down Expand Up @@ -2985,6 +3053,41 @@ declare namespace Webhooks {
repository: PayloadRepository;
sender: WebhookPayloadDeploymentSender;
};
type WebhookPayloadDeployKeySender = {
login: string;
id: number;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
};
type WebhookPayloadDeployKeyKey = {
id: number;
key: string;
url: string;
title: string;
verified: boolean;
created_at: string;
read_only: boolean;
};
type WebhookPayloadDeployKey = {
action: string;
key: WebhookPayloadDeployKeyKey;
repository: PayloadRepository;
sender: WebhookPayloadDeployKeySender;
};
type WebhookPayloadDeleteSender = {
login: string;
id: number;
Expand Down Expand Up @@ -3557,6 +3660,13 @@ declare class Webhooks {
) => Promise<void> | void
): void;

public on(
event: "deploy_key" | "deploy_key.created" | "deploy_key.deleted",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadDeployKey>
) => Promise<void> | void
): void;

public on(
event: "deployment",
callback: (
Expand Down Expand Up @@ -3637,13 +3747,15 @@ declare class Webhooks {
| "issues.demilestoned"
| "issues.edited"
| "issues.labeled"
| "issues.locked"
| "issues.milestoned"
| "issues.opened"
| "issues.pinned"
| "issues.reopened"
| "issues.transferred"
| "issues.unassigned"
| "issues.unlabeled"
| "issues.unlocked"
| "issues.unpinned",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadIssues>
Expand Down Expand Up @@ -3684,6 +3796,13 @@ declare class Webhooks {
) => Promise<void> | void
): void;

public on(
event: "meta" | "meta.deleted",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadMeta>
) => Promise<void> | void
): void;

public on(
event:
| "milestone"
Expand All @@ -3700,9 +3819,11 @@ declare class Webhooks {
public on(
event:
| "organization"
| "organization.deleted"
| "organization.member_added"
| "organization.member_invited"
| "organization.member_removed",
| "organization.member_removed"
| "organization.renamed",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadOrganization>
) => Promise<void> | void
Expand Down Expand Up @@ -3774,13 +3895,15 @@ declare class Webhooks {
| "pull_request.closed"
| "pull_request.edited"
| "pull_request.labeled"
| "pull_request.locked"
| "pull_request.opened"
| "pull_request.ready_for_review"
| "pull_request.reopened"
| "pull_request.review_request_removed"
| "pull_request.review_requested"
| "pull_request.unassigned"
| "pull_request.unlabeled"
| "pull_request.unlocked"
| "pull_request.synchronize",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadPullRequest>
Expand Down Expand Up @@ -3819,7 +3942,14 @@ declare class Webhooks {
): void;

public on(
event: "release" | "release.published",
event:
| "release"
| "release.created"
| "release.deleted"
| "release.edited"
| "release.prereleased"
| "release.published"
| "release.unpublished",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadRelease>
) => Promise<void> | void
Expand All @@ -3831,8 +3961,11 @@ declare class Webhooks {
| "repository.archived"
| "repository.created"
| "repository.deleted"
| "repository.edited"
| "repository.privatized"
| "repository.publicized"
| "repository.renamed"
| "repository.transferred"
| "repository.unarchived",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadRepository>
Expand Down Expand Up @@ -3870,6 +4003,13 @@ declare class Webhooks {
) => Promise<void> | void
): void;

public on(
event: "star" | "star.created" | "star.deleted",
callback: (
event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadStar>
) => Promise<void> | void
): void;

public on(
event: "status",
callback: (
Expand Down
Loading

0 comments on commit 0ec1574

Please sign in to comment.