diff --git a/.github/ISSUE_TEMPLATE/04_feature_request.md b/.github/ISSUE_TEMPLATE/04_feature_request.md
index 89a54819..1dcfc5aa 100644
--- a/.github/ISSUE_TEMPLATE/04_feature_request.md
+++ b/.github/ISSUE_TEMPLATE/04_feature_request.md
@@ -1,6 +1,6 @@
---
name: "🧚♂️ Feature Request"
-about: "Wouldn’t it be nice if 💭"
+about: "Wouldn't it be nice if 💭"
labels: feature
---
diff --git a/README.md b/README.md
index 578a5c79..cbc6359e 100644
--- a/README.md
+++ b/README.md
@@ -22,9 +22,8 @@
- [webhooks.middleware()](#webhooksmiddleware)
- [Webhook events](#webhook-events)
- [TypeScript](#typescript)
- - [`WebhookEvent`](#webhookevent)
- - [`EventNames`](#eventnames)
- - [`EventPayloads`](#eventpayloads)
+ - [`EmitterWebhookEventName`](#emitterwebhookeventname)
+ - [`EmitterWebhookEvent`](#emitterwebhookevent)
- [License](#license)
@@ -465,7 +464,7 @@ Asynchronous `error` event handler are not blocking the `.receive()` method from
Required.
Method to be run each time a webhook event handler throws an error or returns a promise that rejects.
The handler
function can be an async function,
- return a Promise. The handler is called with an error object that has a .event property which hass all the information on the event: {id, name, payload}
.
+ return a Promise. The handler is called with an error object that has a .event property which has all the information on the event: {id, name, payload}
.
@@ -646,23 +645,21 @@ If there are actions for a webhook, events are emitted for both, the webhook nam
## TypeScript
-`@octokit/webhooks` exports 3 types that can be used independent from the code.
+The types for the webhook payloads are sourced from `@octokit/webhooks-definitions`,
+which can be used by themselves.
-Note that changes to the exported types are not considered breaking changes, as the changes will not impact production code, but only fail locally or during CI at build time.
-
-### `WebhookEvent`
+In addition to these types, `@octokit/webhooks` exports 2 types specific to itself:
-The `WebhookEvent` type is an object with the properties `id`, `name`, and `payload`. `name` must be one of the known event names. The type for `payload` be set using an optional type parameter, e.g. `WebhookEvent`
-
-### `EventNames`
+Note that changes to the exported types are not considered breaking changes, as the changes will not impact production code, but only fail locally or during CI at build time.
-The `EventNames` type is a module containing types for all known event names and event/action combinations. For example, `EventNames.CheckRunEvent` is a string enum for `"check_run" | "check_run.completed" | "check_run.created" | "check_run.requested_action" | "check_run.rerequested"`.
+### `EmitterWebhookEventName`
-`EventNames.All` is an enum of all event/action combinations. `EventNames.StringNames` is an enum for the known event names only.
+A union of all possible events supported by the event emitter.
-### `EventPayloads`
+### `EmitterWebhookEvent`
-The `EventPayloads` type exports payload types for all known evens. For example `EventPayloads.WebhookPayloadCheckRun` exports the payload type for the `check_run` event.
+The object that is emitted by `@octokit/webhooks` as an event; made up of an `id`, `name`, and `payload` properties.
+An optional generic parameter can be passed to narrow the type of the `payload` property to be based on the `name` of the event.
## License
diff --git a/package.json b/package.json
index daef11d5..96c401e1 100644
--- a/package.json
+++ b/package.json
@@ -22,13 +22,13 @@
"prettier": {},
"dependencies": {
"@octokit/request-error": "^2.0.2",
+ "@octokit/webhooks-definitions": "3.58.1",
"aggregate-error": "^3.1.0",
"debug": "^4.0.0"
},
"devDependencies": {
"@jest/types": "^26.6.2",
"@octokit/tsconfig": "^1.0.1",
- "@octokit/webhooks-definitions": "3.58.1",
"@pika/pack": "^0.5.0",
"@pika/plugin-build-node": "^0.9.2",
"@pika/plugin-ts-standard-pkg": "^0.9.2",
diff --git a/scripts/generate-types.ts b/scripts/generate-types.ts
index 2baf0193..940484e0 100755
--- a/scripts/generate-types.ts
+++ b/scripts/generate-types.ts
@@ -14,11 +14,6 @@ interface Schema extends JSONSchema7 {
const schema = require("@octokit/webhooks-definitions/schema.json") as Schema;
-const titleCase = (str: string) => `${str[0].toUpperCase()}${str.substring(1)}`;
-
-const guessAtInterfaceName = (str: string) =>
- str.split(/[$_-]/u).map(titleCase).join("");
-
const guessAtEventName = (name: string) => {
const [, eventName] = /^(.+)[$_-]event/u.exec(name) ?? [];
@@ -42,33 +37,14 @@ const getDefinitionName = (ref: string): string => {
};
type NameAndActions = [name: string, actions: string[]];
-type Property = [key: string, value: string];
-type ImportsAndProperties = [imports: string[], properties: Property[]];
const buildEventProperties = ([
eventName,
actions,
-]: NameAndActions): ImportsAndProperties => {
- const interfaceName = guessAtInterfaceName(eventName);
- const importsAndProperties: ImportsAndProperties = [
- [interfaceName],
- [[guessAtEventName(eventName), interfaceName]],
- ];
-
- if (actions.length) {
- actions.forEach((actionName) => {
- const actionInterfaceName = guessAtInterfaceName(`${actionName}_event`);
-
- importsAndProperties[0].push(actionInterfaceName);
- importsAndProperties[1].push([
- guessAtActionName(actionName),
- actionInterfaceName,
- ]);
- });
- }
-
- return importsAndProperties;
-};
+]: NameAndActions): string[] => [
+ guessAtEventName(eventName),
+ ...actions.map(guessAtActionName),
+];
const isJSONSchemaWithRef = (
object: JSONSchema7Definition
@@ -90,17 +66,10 @@ const listEvents = () => {
});
};
-const getImportsAndProperties = (): ImportsAndProperties => {
- const importsAndProperties = listEvents().map(buildEventProperties);
-
- return importsAndProperties.reduce(
- (allImportsAndProperties, [imports, properties]) => {
- return [
- allImportsAndProperties[0].concat(imports),
- allImportsAndProperties[1].concat(properties),
- ];
- },
- [[], []]
+const getEmitterEvents = (): string[] => {
+ return listEvents().reduce(
+ (properties, event) => properties.concat(buildEventProperties(event)),
+ []
);
};
@@ -126,9 +95,8 @@ const asLink = (event: string): string => {
const updateReadme = (properties: string[]) => {
const headers = "| Event | Actions |";
- const events = properties
- .filter((property) => property !== "*" && property !== "error")
- .reduce>((events, property) => {
+ const events = properties.reduce>(
+ (events, property) => {
console.log(property);
const [event, action] = property.split(".");
@@ -139,7 +107,9 @@ const updateReadme = (properties: string[]) => {
}
return events;
- }, {});
+ },
+ {}
+ );
const rows = Object.entries(events).map(
([event, actions]) =>
@@ -172,34 +142,18 @@ const updateReadme = (properties: string[]) => {
};
const run = () => {
- const [imports, properties] = getImportsAndProperties();
-
- const lines: string[] = [
- "// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY",
- "// make edits in scripts/generate-types.ts",
- "",
- "import {",
- ...imports.map((str) => ` ${str},`),
- '} from "@octokit/webhooks-definitions/schema";',
- "",
- "export interface EmitterEventWebhookPayloadMap {",
- ...properties.map(([key, value]) => `"${key}": ${value}`),
- "}",
- ];
+ const emitterEvents = getEmitterEvents();
- generateTypeScriptFile("get-webhook-payload-type-from-event", lines);
generateTypeScriptFile("webhook-names", [
"// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY",
"// make edits in scripts/generate-types.ts",
"",
"export const emitterEventNames = [",
- '"*",',
- '"error",',
- ...properties.map(([key]) => `"${key}",`),
- "];",
+ ...emitterEvents.map((key) => `"${key}",`),
+ "] as const;",
]);
- updateReadme(properties.map(([key]) => key));
+ updateReadme(emitterEvents);
};
run();
diff --git a/src/event-handler/index.ts b/src/event-handler/index.ts
index 23a2bedd..0150f9ee 100644
--- a/src/event-handler/index.ts
+++ b/src/event-handler/index.ts
@@ -1,7 +1,6 @@
import type {
- EmitterAnyEvent,
- EmitterEventName,
EmitterWebhookEvent,
+ EmitterWebhookEventName,
HandlerFunction,
Options,
State,
@@ -16,13 +15,13 @@ import { receiverHandle as receive } from "./receive";
import { removeListener } from "./remove-listener";
interface EventHandler {
- on(
+ on(
event: E | E[],
callback: HandlerFunction
): void;
- onAny(handler: (event: EmitterAnyEvent) => any): void;
+ onAny(handler: (event: EmitterWebhookEvent) => any): void;
onError(handler: (event: WebhookEventHandlerError) => any): void;
- removeListener(
+ removeListener(
event: E | E[],
callback: HandlerFunction
): void;
diff --git a/src/event-handler/on.ts b/src/event-handler/on.ts
index 4fdf5917..cf710494 100644
--- a/src/event-handler/on.ts
+++ b/src/event-handler/on.ts
@@ -1,14 +1,14 @@
import { emitterEventNames } from "../generated/webhook-names";
import {
- EmitterAnyEvent,
- EmitterEventName,
+ EmitterWebhookEvent,
+ EmitterWebhookEventName,
State,
WebhookEventHandlerError,
} from "../types";
function handleEventHandlers(
state: State,
- webhookName: EmitterEventName,
+ webhookName: EmitterWebhookEventName | "error" | "*",
handler: Function
) {
if (!state.hooks[webhookName]) {
@@ -19,7 +19,7 @@ function handleEventHandlers(
}
export function receiverOn(
state: State,
- webhookNameOrNames: EmitterEventName | EmitterEventName[],
+ webhookNameOrNames: EmitterWebhookEventName | EmitterWebhookEventName[],
handler: Function
) {
if (Array.isArray(webhookNameOrNames)) {
@@ -29,18 +29,20 @@ export function receiverOn(
return;
}
- if (emitterEventNames.indexOf(webhookNameOrNames) === -1) {
- console.warn(
- `"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)`
- );
+ if (["*", "error"].includes(webhookNameOrNames)) {
+ const webhookName =
+ (webhookNameOrNames as string) === "*" ? "any" : webhookNameOrNames;
+
+ const message = `Using the "${webhookNameOrNames}" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.on${
+ webhookName.charAt(0).toUpperCase() + webhookName.slice(1)
+ }() method instead`;
+
+ throw new Error(message);
}
- if (webhookNameOrNames === "*" || webhookNameOrNames === "error") {
- const webhookName = webhookNameOrNames === "*" ? "any" : webhookNameOrNames;
+ if (emitterEventNames.indexOf(webhookNameOrNames) === -1) {
console.warn(
- `Using the "${webhookNameOrNames}" event with the regular Webhooks.on() function is deprecated. Please use the Webhooks.on${
- webhookName.charAt(0).toUpperCase() + webhookName.slice(1)
- }() method instead`
+ `"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)`
);
}
@@ -49,7 +51,7 @@ export function receiverOn(
export function receiverOnAny(
state: State,
- handler: (event: EmitterAnyEvent) => any
+ handler: (event: EmitterWebhookEvent) => any
) {
handleEventHandlers(state, "*", handler);
}
diff --git a/src/event-handler/receive.ts b/src/event-handler/receive.ts
index 92181647..74ab9e3b 100644
--- a/src/event-handler/receive.ts
+++ b/src/event-handler/receive.ts
@@ -1,9 +1,8 @@
// @ts-ignore to address #245
import AggregateError from "aggregate-error";
-import { EmitterEventWebhookPayloadMap } from "../generated/get-webhook-payload-type-from-event";
-import {
- EmitterEventName,
+import type {
EmitterWebhookEvent,
+ EmitterWebhookEventName,
State,
WebhookError,
WebhookEventHandlerError,
@@ -11,14 +10,14 @@ import {
import { wrapErrorHandler } from "./wrap-error-handler";
type EventAction = Extract<
- EmitterEventWebhookPayloadMap[keyof EmitterEventWebhookPayloadMap],
+ EmitterWebhookEvent["payload"],
{ action: string }
>["action"];
function getHooks(
state: State,
eventPayloadAction: EventAction | null,
- eventName: EmitterEventName
+ eventName: EmitterWebhookEventName
): Function[] {
const hooks = [state.hooks[eventName], state.hooks["*"]];
@@ -67,6 +66,7 @@ export function receiverHandle(state: State, event: EmitterWebhookEvent) {
let promise = Promise.resolve(event);
if (state.transform) {
+ // @ts-expect-error
promise = promise.then(state.transform);
}
diff --git a/src/event-handler/remove-listener.ts b/src/event-handler/remove-listener.ts
index 6a488b3d..92a39fda 100644
--- a/src/event-handler/remove-listener.ts
+++ b/src/event-handler/remove-listener.ts
@@ -1,8 +1,8 @@
-import { EmitterEventName, State } from "../types";
+import { EmitterWebhookEventName, State } from "../types";
export function removeListener(
state: State,
- webhookNameOrNames: EmitterEventName | EmitterEventName[],
+ webhookNameOrNames: EmitterWebhookEventName | EmitterWebhookEventName[],
handler: Function
) {
if (Array.isArray(webhookNameOrNames)) {
diff --git a/src/event-handler/wrap-error-handler.ts b/src/event-handler/wrap-error-handler.ts
index 8aa11f59..90c40450 100644
--- a/src/event-handler/wrap-error-handler.ts
+++ b/src/event-handler/wrap-error-handler.ts
@@ -1,19 +1,19 @@
// Errors thrown or rejected Promises in "error" event handlers are not handled
// as they are in the webhook event handlers. If errors occur, we log a
-// "Fatal: Error occured" message to stdout
+// "Fatal: Error occurred" message to stdout
export function wrapErrorHandler(handler: Function, error: Error) {
let returnValue;
try {
returnValue = handler(error);
} catch (error) {
- console.log('FATAL: Error occured in "error" event handler');
+ console.log('FATAL: Error occurred in "error" event handler');
console.log(error);
}
if (returnValue && returnValue.catch) {
returnValue.catch((error: Error) => {
- console.log('FATAL: Error occured in "error" event handler');
+ console.log('FATAL: Error occurred in "error" event handler');
console.log(error);
});
}
diff --git a/src/generated/event-payloads.ts b/src/generated/event-payloads.ts
deleted file mode 100644
index 485f4fc4..00000000
--- a/src/generated/event-payloads.ts
+++ /dev/null
@@ -1,4993 +0,0 @@
-// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
-// this file is deprecated - new types come from @octokit/webhooks-definitions/schema
-
-export /** @deprecated */ declare module EventPayloads {
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRunRepositoryOwner = {
- avatar_url: string;
- events_url: string;
- followers_url: string;
- following_url: string;
- gists_url: string;
- gravatar_id: string;
- html_url: string;
- id: number;
- login: string;
- node_id: string;
- organizations_url: string;
- received_events_url: string;
- repos_url: string;
- site_admin: boolean;
- starred_url: string;
- subscriptions_url: string;
- type: string;
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRunRepository = {
- archive_url: string;
- assignees_url: string;
- blobs_url: string;
- branches_url: string;
- collaborators_url: string;
- comments_url: string;
- commits_url: string;
- compare_url: string;
- contents_url: string;
- contributors_url: string;
- deployments_url: string;
- description: string;
- downloads_url: string;
- events_url: string;
- fork: boolean;
- forks_url: string;
- full_name: string;
- git_commits_url: string;
- git_refs_url: string;
- git_tags_url: string;
- hooks_url: string;
- html_url: string;
- id: number;
- issue_comment_url: string;
- issue_events_url: string;
- issues_url: string;
- keys_url: string;
- labels_url: string;
- languages_url: string;
- merges_url: string;
- milestones_url: string;
- name: string;
- node_id: string;
- notifications_url: string;
- owner: WebhookPayloadWorkflowRunWorkflowRunRepositoryOwner;
- private: boolean;
- pulls_url: string;
- releases_url: string;
- stargazers_url: string;
- statuses_url: string;
- subscribers_url: string;
- subscription_url: string;
- tags_url: string;
- teams_url: string;
- trees_url: string;
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRunHeadRepositoryOwner = {
- avatar_url: string;
- events_url: string;
- followers_url: string;
- following_url: string;
- gists_url: string;
- gravatar_id: string;
- html_url: string;
- id: number;
- login: string;
- node_id: string;
- organizations_url: string;
- received_events_url: string;
- repos_url: string;
- site_admin: boolean;
- starred_url: string;
- subscriptions_url: string;
- type: string;
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRunHeadRepository = {
- archive_url: string;
- assignees_url: string;
- blobs_url: string;
- branches_url: string;
- collaborators_url: string;
- comments_url: string;
- commits_url: string;
- compare_url: string;
- contents_url: string;
- contributors_url: string;
- deployments_url: string;
- description: string;
- downloads_url: string;
- events_url: string;
- fork: boolean;
- forks_url: string;
- full_name: string;
- git_commits_url: string;
- git_refs_url: string;
- git_tags_url: string;
- hooks_url: string;
- html_url: string;
- id: number;
- issue_comment_url: string;
- issue_events_url: string;
- issues_url: string;
- keys_url: string;
- labels_url: string;
- languages_url: string;
- merges_url: string;
- milestones_url: string;
- name: string;
- node_id: string;
- notifications_url: string;
- owner: WebhookPayloadWorkflowRunWorkflowRunHeadRepositoryOwner;
- private: boolean;
- pulls_url: string;
- releases_url: string;
- stargazers_url: string;
- statuses_url: string;
- subscribers_url: string;
- subscription_url: string;
- tags_url: string;
- teams_url: string;
- trees_url: string;
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRunHeadCommitCommitter = {
- email: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRunHeadCommitAuthor = {
- email: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRunHeadCommit = {
- author: WebhookPayloadWorkflowRunWorkflowRunHeadCommitAuthor;
- committer: WebhookPayloadWorkflowRunWorkflowRunHeadCommitCommitter;
- id: string;
- message: string;
- timestamp: string;
- tree_id: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflowRun = {
- artifacts_url: string;
- cancel_url: string;
- check_suite_url: string;
- conclusion: string | null;
- created_at: string;
- event: string;
- head_branch: string;
- head_commit: WebhookPayloadWorkflowRunWorkflowRunHeadCommit;
- head_repository: WebhookPayloadWorkflowRunWorkflowRunHeadRepository;
- head_sha: string;
- html_url: string;
- id: number;
- jobs_url: string;
- logs_url: string;
- node_id: string;
- pull_requests: Array;
- repository: WebhookPayloadWorkflowRunWorkflowRunRepository;
- rerun_url: string;
- run_number: number;
- status: string;
- updated_at: string;
- url: string;
- workflow_id: number;
- workflow_url: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunWorkflow = {
- badge_url: string;
- created_at: string;
- html_url: string;
- id: number;
- name: string;
- node_id: string;
- path: string;
- state: string;
- updated_at: string;
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRunOrganization = {
- avatar_url: string;
- description: string;
- events_url: string;
- hooks_url: string;
- id: number;
- issues_url: string;
- login: string;
- members_url: string;
- node_id: string;
- public_members_url: string;
- repos_url: string;
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowRun = {
- action: "action" | "completed" | "requested";
- organization: WebhookPayloadWorkflowRunOrganization;
- repository: PayloadRepository;
- sender: PayloadSender;
- workflow?: WebhookPayloadWorkflowRunWorkflow;
- workflow_run?: WebhookPayloadWorkflowRunWorkflowRun;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowDispatchOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadWorkflowDispatchInputs = {};
- /** @deprecated */
- type WebhookPayloadWorkflowDispatch = {
- inputs: WebhookPayloadWorkflowDispatchInputs;
- ref: string;
- repository: PayloadRepository;
- organization: WebhookPayloadWorkflowDispatchOrganization;
- sender: PayloadSender;
- workflow: string;
- };
- /** @deprecated */
- type WebhookPayloadWatchInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadWatch = {
- action: "started";
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadWatchInstallation;
- };
- /** @deprecated */
- type WebhookPayloadTeamAddInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadTeamAddOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadTeamAddTeam = {
- name: string;
- id: number;
- node_id: string;
- slug: string;
- description: string;
- privacy: string;
- url: string;
- html_url: string;
- members_url: string;
- repositories_url: string;
- permission: string;
- };
- /** @deprecated */
- type WebhookPayloadTeamAdd = {
- team: WebhookPayloadTeamAddTeam;
- repository: PayloadRepository;
- organization: WebhookPayloadTeamAddOrganization;
- sender: PayloadSender;
- installation?: WebhookPayloadTeamAddInstallation;
- };
- /** @deprecated */
- type WebhookPayloadTeamChanges = {};
- /** @deprecated */
- type WebhookPayloadTeamOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type PayloadRepositoryPermissions = {
- pull: boolean;
- push: boolean;
- admin: boolean;
- };
- /** @deprecated */
- type WebhookPayloadTeamTeam = {
- name: string;
- id: number;
- node_id: string;
- slug: string;
- description: string | null;
- privacy: string;
- url: string;
- html_url: string;
- members_url: string;
- repositories_url: string;
- permission: string;
- };
- /** @deprecated */
- type WebhookPayloadTeam = {
- action:
- | "added_to_repository"
- | "created"
- | "deleted"
- | "edited"
- | "removed_from_repository";
- team: WebhookPayloadTeamTeam;
- repository?: PayloadRepository;
- organization: WebhookPayloadTeamOrganization;
- sender: PayloadSender;
- changes?: WebhookPayloadTeamChanges;
- };
- /** @deprecated */
- type WebhookPayloadStatusInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadStatusBranchesItemCommit = { sha: string; url: string };
- /** @deprecated */
- type WebhookPayloadStatusBranchesItem = {
- name: string;
- commit: WebhookPayloadStatusBranchesItemCommit;
- protected: boolean;
- };
- /** @deprecated */
- type WebhookPayloadStatusCommitCommitter = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadStatusCommitAuthor = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadStatusCommitCommitVerification = {
- verified: boolean;
- reason: string;
- signature: string;
- payload: string;
- };
- /** @deprecated */
- type WebhookPayloadStatusCommitCommitTree = { sha: string; url: string };
- /** @deprecated */
- type WebhookPayloadStatusCommitCommitCommitter = {
- name: string;
- email: string;
- date: string;
- };
- /** @deprecated */
- type WebhookPayloadStatusCommitCommitAuthor = {
- name: string;
- email: string;
- date: string;
- };
- /** @deprecated */
- type WebhookPayloadStatusCommitCommit = {
- author: WebhookPayloadStatusCommitCommitAuthor;
- committer: WebhookPayloadStatusCommitCommitCommitter;
- message: string;
- tree: WebhookPayloadStatusCommitCommitTree;
- url: string;
- comment_count: number;
- verification: WebhookPayloadStatusCommitCommitVerification;
- };
- /** @deprecated */
- type WebhookPayloadStatusCommit = {
- sha: string;
- node_id: string;
- commit: WebhookPayloadStatusCommitCommit;
- url: string;
- html_url: string;
- comments_url: string;
- author: WebhookPayloadStatusCommitAuthor;
- committer: WebhookPayloadStatusCommitCommitter;
- parents: Array;
- };
- /** @deprecated */
- type WebhookPayloadStatus = {
- id: number;
- sha: string;
- name: string;
- target_url: null;
- context: string;
- description: null;
- state: string;
- commit: WebhookPayloadStatusCommit;
- branches: Array;
- created_at: string;
- updated_at: string;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadStatusInstallation;
- };
- /** @deprecated */
- type WebhookPayloadStar = {
- action: "created" | "deleted";
- starred_at: string | null;
- repository: PayloadRepository;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadSponsorshipChangesTierFrom = {
- node_id: string;
- created_at: string;
- description: string;
- monthly_price_in_cents: number;
- monthly_price_in_dollars: number;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadSponsorshipChangesTier = {
- from: WebhookPayloadSponsorshipChangesTierFrom;
- };
- /** @deprecated */
- type WebhookPayloadSponsorshipChanges = {
- tier: WebhookPayloadSponsorshipChangesTier;
- };
- /** @deprecated */
- type WebhookPayloadSponsorshipSponsorshipTier = {
- node_id: string;
- created_at: string;
- description: string;
- monthly_price_in_cents: number;
- monthly_price_in_dollars: number;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadSponsorshipSponsorshipSponsor = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadSponsorshipSponsorshipSponsorable = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadSponsorshipSponsorship = {
- node_id: string;
- created_at: string;
- sponsorable: WebhookPayloadSponsorshipSponsorshipSponsorable;
- sponsor: WebhookPayloadSponsorshipSponsorshipSponsor;
- privacy_level: string;
- tier: WebhookPayloadSponsorshipSponsorshipTier;
- };
- /** @deprecated */
- type WebhookPayloadSponsorship = {
- action:
- | "cancelled"
- | "created"
- | "edited"
- | "pending_cancellation"
- | "pending_tier_change"
- | "tier_changed";
- sponsorship: WebhookPayloadSponsorshipSponsorship;
- sender: PayloadSender;
- changes?: WebhookPayloadSponsorshipChanges;
- effective_date?: string;
- };
- /** @deprecated */
- type WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion = {
- identifier: string;
- };
- /** @deprecated */
- type WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemPackage = {
- ecosystem: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItem = {
- package: WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemPackage;
- severity: string;
- vulnerable_version_range: string;
- first_patched_version: WebhookPayloadSecurityAdvisorySecurityAdvisoryVulnerabilitiesItemFirstPatchedVersion;
- };
- /** @deprecated */
- type WebhookPayloadSecurityAdvisorySecurityAdvisoryReferencesItem = {
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadSecurityAdvisorySecurityAdvisoryIdentifiersItem = {
- value: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadSecurityAdvisorySecurityAdvisory = {
- ghsa_id: string;
- summary: string;
- description: string;
- severity: string;
- identifiers: Array;
- references: Array;
- published_at: string;
- updated_at: string;
- withdrawn_at: null;
- vulnerabilities: Array;
- };
- /** @deprecated */
- type WebhookPayloadSecurityAdvisory = {
- action: "performed" | "published" | "updated";
- security_advisory: WebhookPayloadSecurityAdvisorySecurityAdvisory;
- };
- /** @deprecated */
- type WebhookPayloadSecretScanningAlertOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadSecretScanningAlertAlert = {
- number: number;
- secret_type: string;
- resolution: null;
- resolved_by: null;
- resolved_at: null;
- };
- /** @deprecated */
- type WebhookPayloadSecretScanningAlert = {
- action: "created" | "reopened" | "resolved";
- alert: WebhookPayloadSecretScanningAlertAlert;
- repository: PayloadRepository;
- organization: WebhookPayloadSecretScanningAlertOrganization;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryVulnerabilityAlertAlertDismisser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryVulnerabilityAlertOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryVulnerabilityAlertAlert = {
- id: number;
- affected_range: string;
- affected_package_name: string;
- external_reference: string;
- external_identifier: string;
- fixed_in: string;
- ghsa_id?: string;
- created_at?: string;
- dismisser?: WebhookPayloadRepositoryVulnerabilityAlertAlertDismisser;
- dismiss_reason?: string;
- dismissed_at?: string;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryVulnerabilityAlert = {
- action: "create" | "dismiss" | "resolve";
- alert: WebhookPayloadRepositoryVulnerabilityAlertAlert;
- repository?: PayloadRepository;
- sender?: PayloadSender;
- organization?: WebhookPayloadRepositoryVulnerabilityAlertOrganization;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryImportOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryImport = {
- status: string;
- repository: PayloadRepository;
- organization: WebhookPayloadRepositoryImportOrganization;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadRepositoryOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadRepository = {
- action:
- | "archived"
- | "created"
- | "deleted"
- | "edited"
- | "privatized"
- | "publicized"
- | "renamed"
- | "transferred"
- | "unarchived";
- repository: PayloadRepository;
- sender: PayloadSender;
- organization?: WebhookPayloadRepositoryOrganization;
- installation?: WebhookPayloadRepositoryInstallation;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryDispatchInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryDispatchOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadRepositoryDispatchClientPayload = {};
- /** @deprecated */
- type WebhookPayloadRepositoryDispatch = {
- action: "on-demand-test";
- branch: string;
- client_payload: WebhookPayloadRepositoryDispatchClientPayload;
- repository: PayloadRepository;
- organization: WebhookPayloadRepositoryDispatchOrganization;
- sender: PayloadSender;
- installation: WebhookPayloadRepositoryDispatchInstallation;
- };
- /** @deprecated */
- type WebhookPayloadReleaseInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadReleaseReleaseAuthor = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadReleaseRelease = {
- url: string;
- assets_url: string;
- upload_url: string;
- html_url: string;
- id: number;
- node_id: string;
- tag_name: string;
- target_commitish: string;
- name: null;
- draft: boolean;
- author: WebhookPayloadReleaseReleaseAuthor;
- prerelease: boolean;
- created_at: string;
- published_at: string;
- assets: Array;
- tarball_url: string;
- zipball_url: string;
- body: null;
- };
- /** @deprecated */
- type WebhookPayloadRelease = {
- action:
- | "created"
- | "deleted"
- | "edited"
- | "prereleased"
- | "published"
- | "released"
- | "unpublished";
- release: WebhookPayloadReleaseRelease;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadReleaseInstallation;
- };
- /** @deprecated */
- type WebhookPayloadPushOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadPushInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadPushPusher = { name: string; email: string };
- /** @deprecated */
- type WebhookPayloadPush = {
- ref: string;
- before: string;
- after: string;
- created: boolean;
- deleted: boolean;
- forced: boolean;
- base_ref: null;
- compare: string;
- commits: Array;
- head_commit: null;
- repository: PayloadRepository;
- pusher: WebhookPayloadPushPusher;
- sender: PayloadSender;
- installation?: WebhookPayloadPushInstallation;
- organization?: WebhookPayloadPushOrganization;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLabelsItem = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestRequestedReviewersItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestAssigneesItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksStatuses = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksCommits = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksReviewComment = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksReviewComments = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksComments = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksIssue = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksHtml = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinksSelf = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestLinks = {
- self: WebhookPayloadPullRequestReviewCommentPullRequestLinksSelf;
- html: WebhookPayloadPullRequestReviewCommentPullRequestLinksHtml;
- issue: WebhookPayloadPullRequestReviewCommentPullRequestLinksIssue;
- comments: WebhookPayloadPullRequestReviewCommentPullRequestLinksComments;
- review_comments: WebhookPayloadPullRequestReviewCommentPullRequestLinksReviewComments;
- review_comment: WebhookPayloadPullRequestReviewCommentPullRequestLinksReviewComment;
- commits: WebhookPayloadPullRequestReviewCommentPullRequestLinksCommits;
- statuses: WebhookPayloadPullRequestReviewCommentPullRequestLinksStatuses;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestBaseRepoOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestBaseRepo = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: WebhookPayloadPullRequestReviewCommentPullRequestBaseRepoOwner;
- html_url: string;
- description: null;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string;
- updated_at: string;
- pushed_at: string;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: string;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled: boolean;
- open_issues_count: number;
- license: null;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- allow_squash_merge?: boolean;
- allow_merge_commit?: boolean;
- allow_rebase_merge?: boolean;
- delete_branch_on_merge?: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestBaseUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestBase = {
- label: string;
- ref: string;
- sha: string;
- user: WebhookPayloadPullRequestReviewCommentPullRequestBaseUser;
- repo: WebhookPayloadPullRequestReviewCommentPullRequestBaseRepo;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestHeadRepoOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestHeadRepo = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: WebhookPayloadPullRequestReviewCommentPullRequestHeadRepoOwner;
- html_url: string;
- description: null;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string;
- updated_at: string;
- pushed_at: string;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: string;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled: boolean;
- open_issues_count: number;
- license: null;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- allow_squash_merge?: boolean;
- allow_merge_commit?: boolean;
- allow_rebase_merge?: boolean;
- delete_branch_on_merge?: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestHeadUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestHead = {
- label: string;
- ref: string;
- sha: string;
- user: WebhookPayloadPullRequestReviewCommentPullRequestHeadUser;
- repo: WebhookPayloadPullRequestReviewCommentPullRequestHeadRepo;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequestUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentPullRequest = {
- url: string;
- id: number;
- node_id: string;
- html_url: string;
- diff_url: string;
- patch_url: string;
- issue_url: string;
- number: number;
- state: string;
- locked: boolean;
- title: string;
- user: WebhookPayloadPullRequestReviewCommentPullRequestUser;
- body: string;
- created_at: string;
- updated_at: string;
- closed_at: null;
- merged_at: null;
- merge_commit_sha: string;
- assignee: null;
- assignees: Array;
- requested_reviewers: Array;
- requested_teams: Array;
- labels: Array;
- milestone: null;
- commits_url: string;
- review_comments_url: string;
- review_comment_url: string;
- comments_url: string;
- statuses_url: string;
- head: WebhookPayloadPullRequestReviewCommentPullRequestHead;
- base: WebhookPayloadPullRequestReviewCommentPullRequestBase;
- _links: WebhookPayloadPullRequestReviewCommentPullRequestLinks;
- author_association: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentCommentLinksPullRequest = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentCommentLinksHtml = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentCommentLinksSelf = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentCommentLinks = {
- self: WebhookPayloadPullRequestReviewCommentCommentLinksSelf;
- html: WebhookPayloadPullRequestReviewCommentCommentLinksHtml;
- pull_request: WebhookPayloadPullRequestReviewCommentCommentLinksPullRequest;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentCommentUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewCommentComment = {
- url: string;
- pull_request_review_id: number;
- id: number;
- node_id: string;
- diff_hunk: string;
- path: string;
- position: number;
- original_position: number;
- commit_id: string;
- original_commit_id: string;
- user: WebhookPayloadPullRequestReviewCommentCommentUser;
- body: string;
- created_at: string;
- updated_at: string;
- html_url: string;
- pull_request_url: string;
- author_association: string;
- _links: WebhookPayloadPullRequestReviewCommentCommentLinks;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewComment = {
- action: "created" | "deleted" | "edited";
- comment: WebhookPayloadPullRequestReviewCommentComment;
- pull_request: WebhookPayloadPullRequestReviewCommentPullRequest;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadPullRequestReviewCommentInstallation;
- organization?: WebhookPayloadPullRequestReviewCommentOrganization;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLabelsItem = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestRequestedReviewersItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestAssigneesItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksStatuses = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksCommits = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksReviewComment = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksReviewComments = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksComments = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksIssue = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksHtml = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinksSelf = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestLinks = {
- self: WebhookPayloadPullRequestReviewPullRequestLinksSelf;
- html: WebhookPayloadPullRequestReviewPullRequestLinksHtml;
- issue: WebhookPayloadPullRequestReviewPullRequestLinksIssue;
- comments: WebhookPayloadPullRequestReviewPullRequestLinksComments;
- review_comments: WebhookPayloadPullRequestReviewPullRequestLinksReviewComments;
- review_comment: WebhookPayloadPullRequestReviewPullRequestLinksReviewComment;
- commits: WebhookPayloadPullRequestReviewPullRequestLinksCommits;
- statuses: WebhookPayloadPullRequestReviewPullRequestLinksStatuses;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestBaseRepoOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestBaseRepo = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: WebhookPayloadPullRequestReviewPullRequestBaseRepoOwner;
- html_url: string;
- description: null;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string;
- updated_at: string;
- pushed_at: string;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: string;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled: boolean;
- open_issues_count: number;
- license: null;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- allow_squash_merge?: boolean;
- allow_merge_commit?: boolean;
- allow_rebase_merge?: boolean;
- delete_branch_on_merge?: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestBaseUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestBase = {
- label: string;
- ref: string;
- sha: string;
- user: WebhookPayloadPullRequestReviewPullRequestBaseUser;
- repo: WebhookPayloadPullRequestReviewPullRequestBaseRepo;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestHeadRepoOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestHeadRepo = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: WebhookPayloadPullRequestReviewPullRequestHeadRepoOwner;
- html_url: string;
- description: null;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string;
- updated_at: string;
- pushed_at: string;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: string;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled: boolean;
- open_issues_count: number;
- license: null;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- allow_squash_merge?: boolean;
- allow_merge_commit?: boolean;
- allow_rebase_merge?: boolean;
- delete_branch_on_merge?: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestHeadUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestHead = {
- label: string;
- ref: string;
- sha: string;
- user: WebhookPayloadPullRequestReviewPullRequestHeadUser;
- repo: WebhookPayloadPullRequestReviewPullRequestHeadRepo;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequestUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewPullRequest = {
- url: string;
- id: number;
- node_id: string;
- html_url: string;
- diff_url: string;
- patch_url: string;
- issue_url: string;
- number: number;
- state: string;
- locked: boolean;
- title: string;
- user: WebhookPayloadPullRequestReviewPullRequestUser;
- body: string;
- created_at: string;
- updated_at: string;
- closed_at: null;
- merged_at: null;
- merge_commit_sha: string;
- assignee: null;
- assignees: Array;
- requested_reviewers: Array;
- requested_teams: Array;
- labels: Array;
- milestone: null;
- commits_url: string;
- review_comments_url: string;
- review_comment_url: string;
- comments_url: string;
- statuses_url: string;
- head: WebhookPayloadPullRequestReviewPullRequestHead;
- base: WebhookPayloadPullRequestReviewPullRequestBase;
- _links: WebhookPayloadPullRequestReviewPullRequestLinks;
- author_association: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewReviewLinksPullRequest = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewReviewLinksHtml = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewReviewLinks = {
- html: WebhookPayloadPullRequestReviewReviewLinksHtml;
- pull_request: WebhookPayloadPullRequestReviewReviewLinksPullRequest;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewReviewUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReviewReview = {
- id: number;
- node_id: string;
- user: WebhookPayloadPullRequestReviewReviewUser;
- body: null;
- commit_id: string;
- submitted_at: string;
- state: string;
- html_url: string;
- pull_request_url: string;
- author_association: string;
- _links: WebhookPayloadPullRequestReviewReviewLinks;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestReview = {
- action: "dismissed" | "edited" | "submitted";
- review: WebhookPayloadPullRequestReviewReview;
- pull_request: WebhookPayloadPullRequestReviewPullRequest;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadPullRequestReviewInstallation;
- organization?: WebhookPayloadPullRequestReviewOrganization;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestLabel = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestMilestoneCreator = {
- 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 WebhookPayloadPullRequestPullRequestMilestone = null | {
- url: string;
- html_url: string;
- labels_url: string;
- id: number;
- node_id: string;
- number: number;
- title: string;
- description: string;
- creator: WebhookPayloadPullRequestPullRequestMilestoneCreator;
- open_issues: number;
- closed_issues: number;
- state: string;
- created_at: string;
- updated_at: string;
- due_on: string;
- closed_at: string;
- };
- type WebhookPayloadPullRequestPullRequestAssignee = null | {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadPullRequestAssignee = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLabelsItem = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestRequestedReviewersItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestAssigneesItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksStatuses = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksCommits = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksReviewComment = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksReviewComments = {
- href: string;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksComments = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksIssue = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksHtml = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinksSelf = { href: string };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestLinks = {
- self: WebhookPayloadPullRequestPullRequestLinksSelf;
- html: WebhookPayloadPullRequestPullRequestLinksHtml;
- issue: WebhookPayloadPullRequestPullRequestLinksIssue;
- comments: WebhookPayloadPullRequestPullRequestLinksComments;
- review_comments: WebhookPayloadPullRequestPullRequestLinksReviewComments;
- review_comment: WebhookPayloadPullRequestPullRequestLinksReviewComment;
- commits: WebhookPayloadPullRequestPullRequestLinksCommits;
- statuses: WebhookPayloadPullRequestPullRequestLinksStatuses;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestBaseRepoOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestBaseRepo = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: WebhookPayloadPullRequestPullRequestBaseRepoOwner;
- html_url: string;
- description: null;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string;
- updated_at: string;
- pushed_at: string;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: null | string;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled: boolean;
- open_issues_count: number;
- license: null;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- allow_squash_merge?: boolean;
- allow_merge_commit?: boolean;
- allow_rebase_merge?: boolean;
- delete_branch_on_merge?: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestBaseUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestBase = {
- label: string;
- ref: string;
- sha: string;
- user: WebhookPayloadPullRequestPullRequestBaseUser;
- repo: WebhookPayloadPullRequestPullRequestBaseRepo;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestHeadRepoOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestHeadRepo = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: WebhookPayloadPullRequestPullRequestHeadRepoOwner;
- html_url: string;
- description: null;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string;
- updated_at: string;
- pushed_at: string;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: null | string;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled: boolean;
- open_issues_count: number;
- license: null;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- allow_squash_merge?: boolean;
- allow_merge_commit?: boolean;
- allow_rebase_merge?: boolean;
- delete_branch_on_merge?: boolean;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestHeadUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestHead = {
- label: string;
- ref: string;
- sha: string;
- user: WebhookPayloadPullRequestPullRequestHeadUser;
- repo: WebhookPayloadPullRequestPullRequestHeadRepo;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequestUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPullRequestPullRequest = {
- url: string;
- id: number;
- node_id: string;
- html_url: string;
- diff_url: string;
- patch_url: string;
- issue_url: string;
- number: number;
- state: string;
- locked: boolean;
- title: string;
- user: WebhookPayloadPullRequestPullRequestUser;
- body: string;
- created_at: string;
- updated_at: string;
- closed_at: null | string;
- merged_at: null;
- merge_commit_sha: null | string;
- assignee: WebhookPayloadPullRequestPullRequestAssignee;
- assignees: Array;
- requested_reviewers: Array;
- requested_teams: Array;
- labels: Array;
- milestone: WebhookPayloadPullRequestPullRequestMilestone;
- commits_url: string;
- review_comments_url: string;
- review_comment_url: string;
- comments_url: string;
- statuses_url: string;
- head: WebhookPayloadPullRequestPullRequestHead;
- base: WebhookPayloadPullRequestPullRequestBase;
- _links: WebhookPayloadPullRequestPullRequestLinks;
- author_association: string;
- draft: boolean;
- merged: boolean;
- mergeable: null | boolean;
- rebaseable: null | boolean;
- mergeable_state: string;
- merged_by: null;
- comments: number;
- review_comments: number;
- maintainer_can_modify: boolean;
- commits: number;
- additions: number;
- deletions: number;
- changed_files: number;
- };
- /** @deprecated */
- type WebhookPayloadPullRequest = {
- action:
- | "assigned"
- | "closed"
- | "edited"
- | "labeled"
- | "locked"
- | "merged"
- | "opened"
- | "ready_for_review"
- | "reopened"
- | "review_request_removed"
- | "review_requested"
- | "synchronize"
- | "unassigned"
- | "unlabeled"
- | "unlocked";
- number: number;
- pull_request: WebhookPayloadPullRequestPullRequest;
- repository: PayloadRepository;
- sender: PayloadSender;
- assignee?: WebhookPayloadPullRequestAssignee;
- installation?: WebhookPayloadPullRequestInstallation;
- organization?: WebhookPayloadPullRequestOrganization;
- label?: WebhookPayloadPullRequestLabel;
- };
- /** @deprecated */
- type WebhookPayloadPublicInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadPublic = {
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadPublicInstallation;
- };
- /** @deprecated */
- type WebhookPayloadProjectInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadProjectProjectCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadProjectProject = {
- owner_url: string;
- url: string;
- html_url: string;
- columns_url: string;
- id: number;
- node_id: string;
- name: string;
- body: string;
- number: number;
- state: string;
- creator: WebhookPayloadProjectProjectCreator;
- created_at: string;
- updated_at: string;
- };
- /** @deprecated */
- type WebhookPayloadProject = {
- action: "closed" | "created" | "deleted" | "edited" | "reopened";
- project: WebhookPayloadProjectProject;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadProjectInstallation;
- };
- /** @deprecated */
- type WebhookPayloadProjectColumnInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadProjectColumnProjectColumn = {
- url: string;
- project_url: string;
- cards_url: string;
- id: number;
- node_id: string;
- name: string;
- created_at: string;
- updated_at: string;
- };
- /** @deprecated */
- type WebhookPayloadProjectColumn = {
- action: "created" | "deleted" | "edited" | "moved";
- project_column: WebhookPayloadProjectColumnProjectColumn;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadProjectColumnInstallation;
- };
- /** @deprecated */
- type WebhookPayloadProjectCardOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadProjectCardInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadProjectCardProjectCardCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadProjectCardProjectCard = {
- url: string;
- project_url: string;
- column_url: string;
- column_id: number;
- id: number;
- node_id: string;
- note: string;
- archived: boolean;
- creator: WebhookPayloadProjectCardProjectCardCreator;
- created_at: string;
- updated_at: string;
- };
- /** @deprecated */
- type WebhookPayloadProjectCard = {
- action: "converted" | "created" | "deleted" | "edited" | "moved";
- project_card: WebhookPayloadProjectCardProjectCard;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadProjectCardInstallation;
- organization?: WebhookPayloadProjectCardOrganization;
- };
- /** @deprecated */
- type WebhookPayloadPingOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadPingHookLastResponse = {
- code: null;
- status: string;
- message: null;
- };
- /** @deprecated */
- type WebhookPayloadPingHookConfig = {
- content_type: string;
- url: string;
- insecure_ssl: string;
- secret?: string;
- };
- /** @deprecated */
- type WebhookPayloadPingHook = {
- type: string;
- id: number;
- name: string;
- active: boolean;
- events: Array;
- config: WebhookPayloadPingHookConfig;
- updated_at: string;
- created_at: string;
- url: string;
- test_url?: string;
- ping_url: string;
- last_response?: WebhookPayloadPingHookLastResponse;
- };
- /** @deprecated */
- type WebhookPayloadPing = {
- zen: string;
- hook_id: number;
- hook: WebhookPayloadPingHook;
- repository?: PayloadRepository;
- sender: PayloadSender;
- organization?: WebhookPayloadPingOrganization;
- };
- /** @deprecated */
- type WebhookPayloadPageBuildInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadPageBuildBuildPusher = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPageBuildBuildError = { message: null };
- /** @deprecated */
- type WebhookPayloadPageBuildBuild = {
- url: string;
- status: string;
- error: WebhookPayloadPageBuildBuildError;
- pusher: WebhookPayloadPageBuildBuildPusher;
- commit: string;
- duration: number;
- created_at: string;
- updated_at: string;
- };
- /** @deprecated */
- type WebhookPayloadPageBuild = {
- id: number;
- build: WebhookPayloadPageBuildBuild;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadPageBuildInstallation;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackageRegistry = {
- about_url: string;
- name: string;
- type: string;
- url: string;
- vendor: string;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackagePackageVersionAuthor = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackagePackageVersionPackageFilesItem = {
- download_url: string;
- id: number;
- name: string;
- sha256: string;
- sha1: string;
- md5: string;
- content_type: string;
- state: string;
- size: number;
- created_at: string;
- updated_at: string;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackagePackageVersionReleaseAuthor = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackagePackageVersionRelease = {
- url: string;
- html_url: string;
- id: number;
- tag_name: string;
- target_commitish: string;
- name: string;
- draft: boolean;
- author: WebhookPayloadPackagePackagePackageVersionReleaseAuthor;
- prerelease: boolean;
- created_at: string;
- published_at: string;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackagePackageVersion = {
- id: number;
- version: string;
- summary: string;
- body: string;
- body_html: string;
- release: WebhookPayloadPackagePackagePackageVersionRelease;
- manifest: string;
- html_url: string;
- tag_name: string;
- target_commitish: string;
- target_oid: string;
- draft: boolean;
- prerelease: boolean;
- created_at: string;
- updated_at: string;
- metadata: Array;
- package_files: Array;
- author: WebhookPayloadPackagePackagePackageVersionAuthor;
- installation_command: string;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackageOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadPackagePackage = {
- id: number;
- name: string;
- package_type: string;
- html_url: string;
- created_at: string;
- updated_at: string;
- owner: WebhookPayloadPackagePackageOwner;
- package_version: WebhookPayloadPackagePackagePackageVersion;
- registry: WebhookPayloadPackagePackageRegistry;
- };
- /** @deprecated */
- type WebhookPayloadPackage = {
- action: "published" | "updated";
- package: WebhookPayloadPackagePackage;
- repository: PayloadRepository;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadOrgBlockInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadOrgBlockOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadOrgBlockBlockedUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadOrgBlock = {
- action: "blocked" | "unblocked";
- blocked_user: WebhookPayloadOrgBlockBlockedUser;
- organization: WebhookPayloadOrgBlockOrganization;
- sender: PayloadSender;
- installation?: WebhookPayloadOrgBlockInstallation;
- };
- /** @deprecated */
- type WebhookPayloadOrganizationInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadOrganizationOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadOrganizationMembershipUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadOrganizationMembership = {
- url: string;
- state: string;
- role: string;
- organization_url: string;
- user: WebhookPayloadOrganizationMembershipUser;
- };
- /** @deprecated */
- type WebhookPayloadOrganization = {
- action:
- | "deleted"
- | "member_added"
- | "member_invited"
- | "member_removed"
- | "renamed";
- membership: WebhookPayloadOrganizationMembership;
- organization: WebhookPayloadOrganizationOrganization;
- sender: PayloadSender;
- installation?: WebhookPayloadOrganizationInstallation;
- };
- /** @deprecated */
- type WebhookPayloadMilestoneInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadMilestoneMilestoneCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadMilestoneMilestone = {
- url: string;
- html_url: string;
- labels_url: string;
- id: number;
- node_id: string;
- number: number;
- title: string;
- description: string;
- creator: WebhookPayloadMilestoneMilestoneCreator;
- open_issues: number;
- closed_issues: number;
- state: string;
- created_at: string;
- updated_at: string;
- due_on: string;
- closed_at: null | string;
- };
- /** @deprecated */
- type WebhookPayloadMilestone = {
- action: "closed" | "created" | "deleted" | "edited" | "opened";
- milestone: WebhookPayloadMilestoneMilestone;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadMilestoneInstallation;
- };
- /** @deprecated */
- type WebhookPayloadMetaHookConfig = {
- content_type: string;
- insecure_ssl: string;
- url: string;
- };
- /** @deprecated */
- type WebhookPayloadMetaHook = {
- type: string;
- id: number;
- name: string;
- active: boolean;
- events: Array;
- config: WebhookPayloadMetaHookConfig;
- updated_at: string;
- created_at: string;
- };
- /** @deprecated */
- type WebhookPayloadMeta = {
- action: "deleted";
- hook_id: number;
- hook: WebhookPayloadMetaHook;
- repository: PayloadRepository;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadMembershipInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadMembershipOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadMembershipTeam = {
- name: string;
- id: number;
- node_id: string;
- slug: string;
- description: string;
- privacy: string;
- url: string;
- html_url: string;
- members_url: string;
- repositories_url: string;
- permission: string;
- };
- /** @deprecated */
- type WebhookPayloadMembershipMember = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadMembership = {
- action: "added" | "removed";
- scope: string;
- member: WebhookPayloadMembershipMember;
- sender: PayloadSender;
- team: WebhookPayloadMembershipTeam;
- organization: WebhookPayloadMembershipOrganization;
- installation?: WebhookPayloadMembershipInstallation;
- };
- /** @deprecated */
- type WebhookPayloadMemberChangesPermission = { from: string };
- /** @deprecated */
- type WebhookPayloadMemberChanges = {
- permission: WebhookPayloadMemberChangesPermission;
- };
- /** @deprecated */
- type WebhookPayloadMemberInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadMemberMember = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadMember = {
- action: "added" | "edited" | "removed";
- member: WebhookPayloadMemberMember;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadMemberInstallation;
- changes?: WebhookPayloadMemberChanges;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchasePreviousMarketplacePurchasePlan = {
- id: number;
- name: string;
- description: string;
- monthly_price_in_cents: number;
- yearly_price_in_cents: number;
- price_model: string;
- has_free_trial: boolean;
- unit_name: string;
- bullets: Array;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchasePreviousMarketplacePurchaseAccount = {
- type: string;
- id: number;
- login: string;
- organization_billing_email: string;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchasePreviousMarketplacePurchase = {
- account: WebhookPayloadMarketplacePurchasePreviousMarketplacePurchaseAccount;
- billing_cycle: string;
- on_free_trial: boolean;
- free_trial_ends_on: null;
- unit_count: number;
- plan: WebhookPayloadMarketplacePurchasePreviousMarketplacePurchasePlan;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchaseMarketplacePurchasePlan = {
- id: number;
- name: string;
- description: string;
- monthly_price_in_cents: number;
- yearly_price_in_cents: number;
- price_model: string;
- has_free_trial: boolean;
- unit_name: string | null;
- bullets: Array;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchaseMarketplacePurchaseAccount = {
- type: string;
- id: number;
- node_id?: string;
- login: string;
- organization_billing_email: string;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchaseMarketplacePurchase = {
- account: WebhookPayloadMarketplacePurchaseMarketplacePurchaseAccount;
- billing_cycle: string;
- unit_count: number;
- on_free_trial: boolean;
- free_trial_ends_on: null;
- next_billing_date: string;
- plan: WebhookPayloadMarketplacePurchaseMarketplacePurchasePlan;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchaseSender = {
- login: string;
- id: number;
- 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;
- email: string;
- };
- /** @deprecated */
- type WebhookPayloadMarketplacePurchase = {
- action:
- | "cancelled"
- | "changed"
- | "pending_change"
- | "pending_change_cancelled"
- | "purchased";
- effective_date: string;
- sender: WebhookPayloadMarketplacePurchaseSender;
- marketplace_purchase: WebhookPayloadMarketplacePurchaseMarketplacePurchase;
- previous_marketplace_purchase?: WebhookPayloadMarketplacePurchasePreviousMarketplacePurchase;
- };
- /** @deprecated */
- type WebhookPayloadLabelChangesColor = { from: string };
- /** @deprecated */
- type WebhookPayloadLabelChanges = { color: WebhookPayloadLabelChangesColor };
- /** @deprecated */
- type WebhookPayloadLabelInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadLabelLabel = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadLabel = {
- action: "created" | "deleted" | "edited";
- label: WebhookPayloadLabelLabel;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadLabelInstallation;
- changes?: WebhookPayloadLabelChanges;
- };
- /** @deprecated */
- type WebhookPayloadIssuesLabel = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadIssuesIssuePullRequest = {
- url: string;
- html_url: string;
- diff_url: string;
- patch_url: string;
- };
- /** @deprecated */
- type WebhookPayloadIssuesOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadIssuesInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadIssuesAssignee = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssuesChanges = {};
- /** @deprecated */
- type WebhookPayloadIssuesIssueMilestoneCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssuesIssueMilestone = {
- url: string;
- html_url: string;
- labels_url: string;
- id: number;
- node_id: string;
- number: number;
- title: string;
- description: string;
- creator: WebhookPayloadIssuesIssueMilestoneCreator;
- open_issues: number;
- closed_issues: number;
- state: string;
- created_at: string;
- updated_at: string;
- due_on: string;
- closed_at: string;
- } | null;
- /** @deprecated */
- type WebhookPayloadIssuesIssueAssigneesItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssuesIssueAssignee = {
- 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;
- } | null;
- /** @deprecated */
- type WebhookPayloadIssuesIssueLabelsItem = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadIssuesIssueUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssuesIssue = {
- url: string;
- repository_url: string;
- labels_url: string;
- comments_url: string;
- events_url: string;
- html_url: string;
- id: number;
- node_id: string;
- number: number;
- title: string;
- user: WebhookPayloadIssuesIssueUser;
- labels: Array;
- state: string;
- locked: boolean;
- assignee: WebhookPayloadIssuesIssueAssignee;
- assignees: Array;
- milestone: WebhookPayloadIssuesIssueMilestone;
- comments: number;
- created_at: string;
- updated_at: string;
- closed_at: null;
- author_association: string;
- body: string;
- pull_request?: WebhookPayloadIssuesIssuePullRequest;
- };
- /** @deprecated */
- type WebhookPayloadIssues = {
- action:
- | "assigned"
- | "closed"
- | "deleted"
- | "demilestoned"
- | "edited"
- | "labeled"
- | "locked"
- | "milestoned"
- | "opened"
- | "pinned"
- | "reopened"
- | "transferred"
- | "unassigned"
- | "unlabeled"
- | "unlocked"
- | "unpinned";
- issue: WebhookPayloadIssuesIssue;
- changes?: WebhookPayloadIssuesChanges;
- repository: PayloadRepository;
- sender: PayloadSender;
- assignee?: WebhookPayloadIssuesAssignee;
- installation?: WebhookPayloadIssuesInstallation;
- organization?: WebhookPayloadIssuesOrganization;
- label?: WebhookPayloadIssuesLabel;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentChangesBody = { from: string };
- /** @deprecated */
- type WebhookPayloadIssueCommentChanges = {
- body: WebhookPayloadIssueCommentChangesBody;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadIssueCommentOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentCommentUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentComment = {
- url: string;
- html_url: string;
- issue_url: string;
- id: number;
- node_id: string;
- user: WebhookPayloadIssueCommentCommentUser;
- created_at: string;
- updated_at: string;
- author_association: string;
- body: string;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentIssueMilestoneCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentIssueMilestone = {
- url: string;
- html_url: string;
- labels_url: string;
- id: number;
- node_id: string;
- number: number;
- title: string;
- description: string;
- creator: WebhookPayloadIssueCommentIssueMilestoneCreator;
- open_issues: number;
- closed_issues: number;
- state: string;
- created_at: string;
- updated_at: string;
- due_on: string;
- closed_at: string;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentIssueAssigneesItem = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentIssueAssignee = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentIssueLabelsItem = {
- id: number;
- node_id: string;
- url: string;
- name: string;
- color: string;
- default: boolean;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentIssueUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadIssueCommentIssue = {
- url: string;
- repository_url: string;
- labels_url: string;
- comments_url: string;
- events_url: string;
- html_url: string;
- id: number;
- node_id: string;
- number: number;
- title: string;
- user: WebhookPayloadIssueCommentIssueUser;
- labels: Array;
- state: string;
- locked: boolean;
- assignee: WebhookPayloadIssueCommentIssueAssignee;
- assignees: Array;
- milestone: WebhookPayloadIssueCommentIssueMilestone;
- comments: number;
- created_at: string;
- updated_at: string;
- closed_at: null;
- author_association: string;
- body: string;
- };
- /** @deprecated */
- type WebhookPayloadIssueComment = {
- action: "created" | "deleted" | "edited";
- issue: WebhookPayloadIssueCommentIssue;
- comment: WebhookPayloadIssueCommentComment;
- repository: PayloadRepository;
- sender: PayloadSender;
- organization?: WebhookPayloadIssueCommentOrganization;
- installation?: WebhookPayloadIssueCommentInstallation;
- changes?: WebhookPayloadIssueCommentChanges;
- };
- /** @deprecated */
- type WebhookPayloadInstallationRepositoriesRepositoriesRemovedItem = {
- id: number;
- name: string;
- full_name: string;
- private: boolean;
- };
- /** @deprecated */
- type WebhookPayloadInstallationRepositoriesRepositoriesAddedItem = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- };
- /** @deprecated */
- type WebhookPayloadInstallationRepositoriesInstallationPermissions = {
- administration?: string;
- statuses?: string;
- repository_projects?: string;
- repository_hooks?: string;
- pull_requests?: string;
- pages?: string;
- issues: string;
- deployments?: string;
- contents: string;
- checks?: string;
- metadata: string;
- vulnerability_alerts?: string;
- };
- /** @deprecated */
- type WebhookPayloadInstallationRepositoriesInstallationAccount = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadInstallationRepositoriesInstallation = {
- id: number;
- account: WebhookPayloadInstallationRepositoriesInstallationAccount;
- repository_selection: string;
- access_tokens_url: string;
- repositories_url: string;
- html_url: string;
- app_id: number;
- target_id: number;
- target_type: string;
- permissions: WebhookPayloadInstallationRepositoriesInstallationPermissions;
- events: Array;
- created_at: number;
- updated_at: number;
- single_file_name: null | string;
- };
- /** @deprecated */
- type WebhookPayloadInstallationRepositories = {
- action: "added" | "removed";
- installation: WebhookPayloadInstallationRepositoriesInstallation;
- repository_selection: string;
- repositories_added: Array;
- repositories_removed: Array;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadInstallationRepositoriesItem = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- };
- /** @deprecated */
- type WebhookPayloadInstallationInstallationPermissions = {
- metadata: string;
- contents: string;
- issues: string;
- administration?: string;
- checks?: string;
- deployments?: string;
- pages?: string;
- pull_requests?: string;
- repository_hooks?: string;
- repository_projects?: string;
- statuses?: string;
- vulnerability_alerts?: string;
- };
- /** @deprecated */
- type WebhookPayloadInstallationInstallationAccount = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadInstallationInstallation = {
- id: number;
- account: WebhookPayloadInstallationInstallationAccount;
- repository_selection: string;
- access_tokens_url: string;
- repositories_url: string;
- html_url: string;
- app_id: number;
- target_id: number;
- target_type: string;
- permissions: WebhookPayloadInstallationInstallationPermissions;
- events: Array;
- created_at: number;
- updated_at: number;
- single_file_name: string | null;
- };
- /** @deprecated */
- type WebhookPayloadInstallation = {
- action:
- | "created"
- | "deleted"
- | "new_permissions_accepted"
- | "suspend"
- | "unsuspend";
- installation: WebhookPayloadInstallationInstallation;
- repositories: Array;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadGollumInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadGollumPagesItem = {
- page_name: string;
- title: string;
- summary: null;
- action: string;
- sha: string;
- html_url: string;
- };
- /** @deprecated */
- type WebhookPayloadGollum = {
- pages: Array;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadGollumInstallation;
- };
- /** @deprecated */
- type WebhookPayloadGithubAppAuthorization = {
- action: "revoked";
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadForkInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadForkForkeeOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadForkForkee = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: WebhookPayloadForkForkeeOwner;
- html_url: string;
- description: null;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string;
- updated_at: string;
- pushed_at: string;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: null;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled: boolean;
- open_issues_count: number;
- license: null;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- public: boolean;
- };
- /** @deprecated */
- type WebhookPayloadFork = {
- forkee: WebhookPayloadForkForkee;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadForkInstallation;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentStatusInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentStatusDeploymentCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentStatusDeploymentPayload = {};
- /** @deprecated */
- type WebhookPayloadDeploymentStatusDeployment = {
- url: string;
- id: number;
- node_id: string;
- sha: string;
- ref: string;
- task: string;
- payload: WebhookPayloadDeploymentStatusDeploymentPayload;
- original_environment: string;
- environment: string;
- description: null;
- creator: WebhookPayloadDeploymentStatusDeploymentCreator;
- created_at: string;
- updated_at: string;
- statuses_url: string;
- repository_url: string;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentStatusDeploymentStatusCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentStatusDeploymentStatus = {
- url: string;
- id: number;
- node_id: string;
- state: string;
- creator: WebhookPayloadDeploymentStatusDeploymentStatusCreator;
- description: string;
- environment: string;
- target_url: string;
- created_at: string;
- updated_at: string;
- deployment_url: string;
- repository_url: string;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentStatus = {
- action: "created";
- deployment_status: WebhookPayloadDeploymentStatusDeploymentStatus;
- deployment: WebhookPayloadDeploymentStatusDeployment;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadDeploymentStatusInstallation;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadDeploymentDeploymentCreator = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadDeploymentDeploymentPayload = {};
- /** @deprecated */
- type WebhookPayloadDeploymentDeployment = {
- url: string;
- id: number;
- node_id: string;
- sha: string;
- ref: string;
- task: string;
- payload: WebhookPayloadDeploymentDeploymentPayload;
- original_environment: string;
- environment: string;
- description: null;
- creator: WebhookPayloadDeploymentDeploymentCreator;
- created_at: string;
- updated_at: string;
- statuses_url: string;
- repository_url: string;
- };
- /** @deprecated */
- type WebhookPayloadDeployment = {
- action: "created";
- deployment: WebhookPayloadDeploymentDeployment;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadDeploymentInstallation;
- };
- /** @deprecated */
- type WebhookPayloadDeployKeyKey = {
- id: number;
- key: string;
- url: string;
- title: string;
- verified: boolean;
- created_at: string;
- read_only: boolean;
- };
- /** @deprecated */
- type WebhookPayloadDeployKey = {
- action: "created" | "deleted";
- key: WebhookPayloadDeployKeyKey;
- repository: PayloadRepository;
- sender: PayloadSender;
- };
- /** @deprecated */
- type WebhookPayloadDeleteOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadDeleteInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadDelete = {
- ref: string;
- ref_type: string;
- pusher_type: string;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadDeleteInstallation;
- organization?: WebhookPayloadDeleteOrganization;
- };
- /** @deprecated */
- type WebhookPayloadCreateOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadCreateInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadCreate = {
- ref: string;
- ref_type: string;
- master_branch: string;
- description: null;
- pusher_type: string;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation?: WebhookPayloadCreateInstallation;
- organization?: WebhookPayloadCreateOrganization;
- };
- /** @deprecated */
- type WebhookPayloadContentReferenceInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadContentReferenceContentReference = {
- id: number;
- node_id: string;
- reference: string;
- };
- /** @deprecated */
- type WebhookPayloadContentReference = {
- action: "created";
- content_reference: WebhookPayloadContentReferenceContentReference;
- repository: PayloadRepository;
- sender: PayloadSender;
- installation: WebhookPayloadContentReferenceInstallation;
- };
- /** @deprecated */
- type WebhookPayloadCommitCommentInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadCommitCommentOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadCommitCommentCommentUser = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadCommitCommentComment = {
- url: string;
- html_url: string;
- id: number;
- node_id: string;
- user: WebhookPayloadCommitCommentCommentUser;
- position: null;
- line: null;
- path: null;
- commit_id: string;
- created_at: string;
- updated_at: string;
- author_association: string;
- body: string;
- };
- /** @deprecated */
- type WebhookPayloadCommitComment = {
- action: "created";
- comment: WebhookPayloadCommitCommentComment;
- repository: PayloadRepository;
- sender: PayloadSender;
- organization?: WebhookPayloadCommitCommentOrganization;
- installation?: WebhookPayloadCommitCommentInstallation;
- };
- /** @deprecated */
- type WebhookPayloadCodeScanningAlertInstallation = {
- id: number;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadCodeScanningAlertOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadCodeScanningAlertAlertTool = {
- name: string;
- version: null;
- };
- /** @deprecated */
- type WebhookPayloadCodeScanningAlertAlertRule = {
- id: string;
- severity: string;
- description: string;
- };
- /** @deprecated */
- type WebhookPayloadCodeScanningAlertAlertInstancesItem = {
- ref: string;
- analysis_key: string;
- environment: string;
- state: string;
- };
- /** @deprecated */
- type WebhookPayloadCodeScanningAlertAlert = {
- number: number;
- created_at: string;
- url: string;
- html_url: string;
- instances: Array;
- state: string;
- dismissed_by: null;
- dismissed_at: null;
- dismissed_reason: null;
- rule: WebhookPayloadCodeScanningAlertAlertRule;
- tool: WebhookPayloadCodeScanningAlertAlertTool;
- };
- /** @deprecated */
- type WebhookPayloadCodeScanningAlert = {
- action:
- | "appeared_in_branch"
- | "closed_by_user"
- | "created"
- | "fixed"
- | "reopened"
- | "reopened_by_user";
- alert: WebhookPayloadCodeScanningAlertAlert;
- ref: string;
- commit_oid: string;
- repository: PayloadRepository;
- organization: WebhookPayloadCodeScanningAlertOrganization;
- installation?: WebhookPayloadCodeScanningAlertInstallation;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteInstallation = { id: number; node_id: string };
- /** @deprecated */
- type WebhookPayloadCheckSuiteOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name: string;
- company: null;
- blog: null;
- location: null;
- email: null;
- twitter_username: null;
- is_verified: boolean;
- has_organization_projects: boolean;
- has_repository_projects: boolean;
- public_repos: number;
- public_gists: number;
- followers: number;
- following: number;
- html_url: string;
- created_at: string;
- updated_at: string;
- type: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuiteHeadCommitCommitter = {
- name: string;
- email: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuiteHeadCommitAuthor = {
- name: string;
- email: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuiteHeadCommit = {
- id: string;
- tree_id: string;
- message: string;
- timestamp: string;
- author: WebhookPayloadCheckSuiteCheckSuiteHeadCommitAuthor;
- committer: WebhookPayloadCheckSuiteCheckSuiteHeadCommitCommitter;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuiteAppPermissions = {
- administration: string;
- checks: string;
- contents: string;
- deployments: string;
- issues: string;
- members: string;
- metadata: string;
- organization_administration: string;
- organization_hooks: string;
- organization_plan: string;
- organization_projects: string;
- organization_user_blocking: string;
- pages: string;
- pull_requests: string;
- repository_hooks: string;
- repository_projects: string;
- statuses: string;
- team_discussions: string;
- vulnerability_alerts: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuiteAppOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuiteApp = {
- id: number;
- node_id: string;
- owner: WebhookPayloadCheckSuiteCheckSuiteAppOwner;
- name: string;
- description: string;
- external_url: string;
- html_url: string;
- created_at: string;
- updated_at: string;
- permissions: WebhookPayloadCheckSuiteCheckSuiteAppPermissions;
- events: Array;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBaseRepo = {
- id: number;
- url: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBase = {
- ref: string;
- sha: string;
- repo: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBaseRepo;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHeadRepo = {
- id: number;
- url: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHead = {
- ref: string;
- sha: string;
- repo: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHeadRepo;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuitePullRequestsItem = {
- url: string;
- id: number;
- number: number;
- head: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHead;
- base: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBase;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuiteCheckSuite = {
- id: number;
- node_id: string;
- head_branch: string;
- head_sha: string;
- status: string;
- conclusion: string | null;
- url: string;
- before: string;
- after: string;
- pull_requests: Array;
- app: WebhookPayloadCheckSuiteCheckSuiteApp;
- created_at: string;
- updated_at: string;
- latest_check_runs_count: number;
- check_runs_url: string;
- head_commit: WebhookPayloadCheckSuiteCheckSuiteHeadCommit;
- };
- /** @deprecated */
- type WebhookPayloadCheckSuite = {
- action: "completed" | "requested" | "rerequested";
- check_suite: WebhookPayloadCheckSuiteCheckSuite;
- repository: PayloadRepository;
- sender: PayloadSender;
- organization?: WebhookPayloadCheckSuiteOrganization;
- installation?: WebhookPayloadCheckSuiteInstallation;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunInstallation = { id: number; node_id: string };
- type PayloadRepositoryLicense = null | {
- key: string;
- name: string;
- spdx_id: string;
- url: string;
- node_id: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunRequestedAction = { identifier: string };
- /** @deprecated */
- type WebhookPayloadCheckRunOrganization = {
- login: string;
- id: number;
- node_id: string;
- url: string;
- repos_url: string;
- events_url: string;
- hooks_url: string;
- issues_url: string;
- members_url: string;
- public_members_url: string;
- avatar_url: string;
- description: string;
- name?: string;
- company?: null;
- blog?: null;
- location?: null;
- email?: null;
- twitter_username?: null;
- is_verified?: boolean;
- has_organization_projects?: boolean;
- has_repository_projects?: boolean;
- public_repos?: number;
- public_gists?: number;
- followers?: number;
- following?: number;
- html_url?: string;
- created_at?: string;
- updated_at?: string;
- type?: string;
- };
- /** @deprecated */
- type PayloadSender = {
- 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;
- email?: string;
- };
- /** @deprecated */
- type PayloadRepositoryOwner = {
- 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;
- name?: string;
- email?: string;
- };
- /** @deprecated */
- type PayloadRepository = {
- id: number;
- node_id: string;
- name: string;
- full_name: string;
- private: boolean;
- owner: PayloadRepositoryOwner;
- html_url: string;
- description: null | string;
- fork: boolean;
- url: string;
- forks_url: string;
- keys_url: string;
- collaborators_url: string;
- teams_url: string;
- hooks_url: string;
- issue_events_url: string;
- events_url: string;
- assignees_url: string;
- branches_url: string;
- tags_url: string;
- blobs_url: string;
- git_tags_url: string;
- git_refs_url: string;
- trees_url: string;
- statuses_url: string;
- languages_url: string;
- stargazers_url: string;
- contributors_url: string;
- subscribers_url: string;
- subscription_url: string;
- commits_url: string;
- git_commits_url: string;
- comments_url: string;
- issue_comment_url: string;
- contents_url: string;
- compare_url: string;
- merges_url: string;
- archive_url: string;
- downloads_url: string;
- issues_url: string;
- pulls_url: string;
- milestones_url: string;
- notifications_url: string;
- labels_url: string;
- releases_url: string;
- deployments_url: string;
- created_at: string | number;
- updated_at: string;
- pushed_at: string | number;
- git_url: string;
- ssh_url: string;
- clone_url: string;
- svn_url: string;
- homepage: null | string;
- size: number;
- stargazers_count: number;
- watchers_count: number;
- language: string | null;
- has_issues: boolean;
- has_projects: boolean;
- has_downloads: boolean;
- has_wiki: boolean;
- has_pages: boolean;
- forks_count: number;
- mirror_url: null;
- archived: boolean;
- disabled?: boolean;
- open_issues_count: number;
- license: PayloadRepositoryLicense;
- forks: number;
- open_issues: number;
- watchers: number;
- default_branch: string;
- stargazers?: number;
- master_branch?: string;
- permissions?: PayloadRepositoryPermissions;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunPullRequestsItemBaseRepo = {
- id: number;
- url: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunPullRequestsItemBase = {
- ref: string;
- sha: string;
- repo: WebhookPayloadCheckRunCheckRunPullRequestsItemBaseRepo;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunPullRequestsItemHeadRepo = {
- id: number;
- url: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunPullRequestsItemHead = {
- ref: string;
- sha: string;
- repo: WebhookPayloadCheckRunCheckRunPullRequestsItemHeadRepo;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunPullRequestsItem = {
- url: string;
- id: number;
- number: number;
- head: WebhookPayloadCheckRunCheckRunPullRequestsItemHead;
- base: WebhookPayloadCheckRunCheckRunPullRequestsItemBase;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunAppPermissions = {
- administration?: string;
- checks: string;
- contents?: string;
- deployments?: string;
- issues?: string;
- members: string;
- metadata: string;
- organization_administration?: string;
- organization_hooks?: string;
- organization_plan?: string;
- organization_projects?: string;
- organization_user_blocking?: string;
- pages?: string;
- pull_requests: string;
- repository_hooks?: string;
- repository_projects?: string;
- statuses?: string;
- team_discussions?: string;
- vulnerability_alerts?: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunAppOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunApp = {
- id: number;
- node_id: string;
- owner: WebhookPayloadCheckRunCheckRunAppOwner;
- name: string;
- description: string | null;
- external_url: string;
- html_url: string;
- created_at: string;
- updated_at: string;
- permissions?: WebhookPayloadCheckRunCheckRunAppPermissions;
- events?: Array;
- slug?: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuiteAppPermissions = {
- administration?: string;
- checks: string;
- contents?: string;
- deployments?: string;
- issues?: string;
- members: string;
- metadata: string;
- organization_administration?: string;
- organization_hooks?: string;
- organization_plan?: string;
- organization_projects?: string;
- organization_user_blocking?: string;
- pages?: string;
- pull_requests: string;
- repository_hooks?: string;
- repository_projects?: string;
- statuses?: string;
- team_discussions?: string;
- vulnerability_alerts?: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuiteAppOwner = {
- 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;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuiteApp = {
- id: number;
- node_id: string;
- owner: WebhookPayloadCheckRunCheckRunCheckSuiteAppOwner;
- name: string;
- description: string | null;
- external_url: string;
- html_url: string;
- created_at: string;
- updated_at: string;
- permissions?: WebhookPayloadCheckRunCheckRunCheckSuiteAppPermissions;
- events?: Array;
- slug?: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBaseRepo = {
- id: number;
- url: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBase = {
- ref: string;
- sha: string;
- repo: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBaseRepo;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHeadRepo = {
- id: number;
- url: string;
- name: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHead = {
- ref: string;
- sha: string;
- repo: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHeadRepo;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItem = {
- url: string;
- id: number;
- number: number;
- head: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHead;
- base: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBase;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunCheckSuite = {
- id: number;
- node_id?: string;
- head_branch: string;
- head_sha: string;
- status: string;
- conclusion: null | string;
- url: string;
- before: string;
- after: string;
- pull_requests: Array;
- app: WebhookPayloadCheckRunCheckRunCheckSuiteApp;
- created_at: string;
- updated_at: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRunOutput = {
- title: null | string;
- summary: null | string;
- text: null | string;
- annotations_count: number;
- annotations_url: string;
- };
- /** @deprecated */
- type WebhookPayloadCheckRunCheckRun = {
- id: number;
- node_id?: string;
- head_sha: string;
- external_id: string;
- url: string;
- html_url: string;
- details_url?: string;
- status: string;
- conclusion: null | string;
- started_at: string;
- completed_at: null | string;
- output: WebhookPayloadCheckRunCheckRunOutput;
- name: string;
- check_suite: WebhookPayloadCheckRunCheckRunCheckSuite;
- app: WebhookPayloadCheckRunCheckRunApp;
- pull_requests: Array;
- };
- /** @deprecated */
- type WebhookPayloadCheckRun = {
- action: "completed" | "created" | "requested_action" | "rerequested";
- check_run: WebhookPayloadCheckRunCheckRun;
- repository: PayloadRepository;
- sender: PayloadSender;
- organization?: WebhookPayloadCheckRunOrganization;
- requested_action?: WebhookPayloadCheckRunRequestedAction;
- installation?: WebhookPayloadCheckRunInstallation;
- };
-}
diff --git a/src/generated/get-webhook-payload-type-from-event.ts b/src/generated/get-webhook-payload-type-from-event.ts
deleted file mode 100644
index f22b8d87..00000000
--- a/src/generated/get-webhook-payload-type-from-event.ts
+++ /dev/null
@@ -1,416 +0,0 @@
-// THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
-// make edits in scripts/generate-types.ts
-
-import {
- CheckRunEvent,
- CheckRunCompletedEvent,
- CheckRunCreatedEvent,
- CheckRunRequestedActionEvent,
- CheckRunRerequestedEvent,
- CheckSuiteEvent,
- CheckSuiteCompletedEvent,
- CheckSuiteRequestedEvent,
- CheckSuiteRerequestedEvent,
- CodeScanningAlertEvent,
- CodeScanningAlertAppearedInBranchEvent,
- CodeScanningAlertClosedByUserEvent,
- CodeScanningAlertCreatedEvent,
- CodeScanningAlertFixedEvent,
- CodeScanningAlertReopenedEvent,
- CodeScanningAlertReopenedByUserEvent,
- CommitCommentEvent,
- CommitCommentCreatedEvent,
- ContentReferenceEvent,
- ContentReferenceCreatedEvent,
- CreateEvent,
- DeleteEvent,
- DeployKeyEvent,
- DeployKeyCreatedEvent,
- DeployKeyDeletedEvent,
- DeploymentEvent,
- DeploymentCreatedEvent,
- DeploymentStatusEvent,
- DeploymentStatusCreatedEvent,
- ForkEvent,
- GithubAppAuthorizationEvent,
- GithubAppAuthorizationRevokedEvent,
- GollumEvent,
- InstallationEvent,
- InstallationCreatedEvent,
- InstallationDeletedEvent,
- InstallationNewPermissionsAcceptedEvent,
- InstallationSuspendEvent,
- InstallationUnsuspendEvent,
- InstallationRepositoriesEvent,
- InstallationRepositoriesAddedEvent,
- InstallationRepositoriesRemovedEvent,
- IssueCommentEvent,
- IssueCommentCreatedEvent,
- IssueCommentDeletedEvent,
- IssueCommentEditedEvent,
- IssuesEvent,
- IssuesAssignedEvent,
- IssuesClosedEvent,
- IssuesDeletedEvent,
- IssuesDemilestonedEvent,
- IssuesEditedEvent,
- IssuesLabeledEvent,
- IssuesLockedEvent,
- IssuesMilestonedEvent,
- IssuesOpenedEvent,
- IssuesPinnedEvent,
- IssuesReopenedEvent,
- IssuesTransferredEvent,
- IssuesUnassignedEvent,
- IssuesUnlabeledEvent,
- IssuesUnlockedEvent,
- IssuesUnpinnedEvent,
- LabelEvent,
- LabelCreatedEvent,
- LabelDeletedEvent,
- LabelEditedEvent,
- MarketplacePurchaseEvent,
- MarketplacePurchaseCancelledEvent,
- MarketplacePurchaseChangedEvent,
- MarketplacePurchasePendingChangeEvent,
- MarketplacePurchasePendingChangeCancelledEvent,
- MarketplacePurchasePurchasedEvent,
- MemberEvent,
- MemberAddedEvent,
- MemberEditedEvent,
- MemberRemovedEvent,
- MembershipEvent,
- MembershipAddedEvent,
- MembershipRemovedEvent,
- MetaEvent,
- MetaDeletedEvent,
- MilestoneEvent,
- MilestoneClosedEvent,
- MilestoneCreatedEvent,
- MilestoneDeletedEvent,
- MilestoneEditedEvent,
- MilestoneOpenedEvent,
- OrgBlockEvent,
- OrgBlockBlockedEvent,
- OrgBlockUnblockedEvent,
- OrganizationEvent,
- OrganizationDeletedEvent,
- OrganizationMemberAddedEvent,
- OrganizationMemberInvitedEvent,
- OrganizationMemberRemovedEvent,
- OrganizationRenamedEvent,
- PackageEvent,
- PackagePublishedEvent,
- PackageUpdatedEvent,
- PageBuildEvent,
- PingEvent,
- ProjectEvent,
- ProjectClosedEvent,
- ProjectCreatedEvent,
- ProjectDeletedEvent,
- ProjectEditedEvent,
- ProjectReopenedEvent,
- ProjectCardEvent,
- ProjectCardConvertedEvent,
- ProjectCardCreatedEvent,
- ProjectCardDeletedEvent,
- ProjectCardEditedEvent,
- ProjectCardMovedEvent,
- ProjectColumnEvent,
- ProjectColumnCreatedEvent,
- ProjectColumnDeletedEvent,
- ProjectColumnEditedEvent,
- ProjectColumnMovedEvent,
- PublicEvent,
- PullRequestEvent,
- PullRequestAssignedEvent,
- PullRequestAutoMergeDisabledEvent,
- PullRequestAutoMergeEnabledEvent,
- PullRequestClosedEvent,
- PullRequestConvertedToDraftEvent,
- PullRequestEditedEvent,
- PullRequestLabeledEvent,
- PullRequestLockedEvent,
- PullRequestOpenedEvent,
- PullRequestReadyForReviewEvent,
- PullRequestReopenedEvent,
- PullRequestReviewRequestRemovedEvent,
- PullRequestReviewRequestedEvent,
- PullRequestSynchronizeEvent,
- PullRequestUnassignedEvent,
- PullRequestUnlabeledEvent,
- PullRequestUnlockedEvent,
- PullRequestReviewEvent,
- PullRequestReviewDismissedEvent,
- PullRequestReviewEditedEvent,
- PullRequestReviewSubmittedEvent,
- PullRequestReviewCommentEvent,
- PullRequestReviewCommentCreatedEvent,
- PullRequestReviewCommentDeletedEvent,
- PullRequestReviewCommentEditedEvent,
- PushEvent,
- ReleaseEvent,
- ReleaseCreatedEvent,
- ReleaseDeletedEvent,
- ReleaseEditedEvent,
- ReleasePrereleasedEvent,
- ReleasePublishedEvent,
- ReleaseReleasedEvent,
- ReleaseUnpublishedEvent,
- RepositoryEvent,
- RepositoryArchivedEvent,
- RepositoryCreatedEvent,
- RepositoryDeletedEvent,
- RepositoryEditedEvent,
- RepositoryPrivatizedEvent,
- RepositoryPublicizedEvent,
- RepositoryRenamedEvent,
- RepositoryTransferredEvent,
- RepositoryUnarchivedEvent,
- RepositoryDispatchEvent,
- RepositoryDispatchOnDemandTestEvent,
- RepositoryImportEvent,
- RepositoryVulnerabilityAlertEvent,
- RepositoryVulnerabilityAlertCreateEvent,
- RepositoryVulnerabilityAlertDismissEvent,
- RepositoryVulnerabilityAlertResolveEvent,
- SecretScanningAlertEvent,
- SecretScanningAlertCreatedEvent,
- SecretScanningAlertReopenedEvent,
- SecretScanningAlertResolvedEvent,
- SecurityAdvisoryEvent,
- SecurityAdvisoryPerformedEvent,
- SecurityAdvisoryPublishedEvent,
- SecurityAdvisoryUpdatedEvent,
- SponsorshipEvent,
- SponsorshipCancelledEvent,
- SponsorshipCreatedEvent,
- SponsorshipEditedEvent,
- SponsorshipPendingCancellationEvent,
- SponsorshipPendingTierChangeEvent,
- SponsorshipTierChangedEvent,
- StarEvent,
- StarCreatedEvent,
- StarDeletedEvent,
- StatusEvent,
- TeamEvent,
- TeamAddedToRepositoryEvent,
- TeamCreatedEvent,
- TeamDeletedEvent,
- TeamEditedEvent,
- TeamRemovedFromRepositoryEvent,
- TeamAddEvent,
- WatchEvent,
- WatchStartedEvent,
- WorkflowDispatchEvent,
- WorkflowRunEvent,
- WorkflowRunCompletedEvent,
- WorkflowRunRequestedEvent,
-} from "@octokit/webhooks-definitions/schema";
-
-export interface EmitterEventWebhookPayloadMap {
- check_run: CheckRunEvent;
- "check_run.completed": CheckRunCompletedEvent;
- "check_run.created": CheckRunCreatedEvent;
- "check_run.requested_action": CheckRunRequestedActionEvent;
- "check_run.rerequested": CheckRunRerequestedEvent;
- check_suite: CheckSuiteEvent;
- "check_suite.completed": CheckSuiteCompletedEvent;
- "check_suite.requested": CheckSuiteRequestedEvent;
- "check_suite.rerequested": CheckSuiteRerequestedEvent;
- code_scanning_alert: CodeScanningAlertEvent;
- "code_scanning_alert.appeared_in_branch": CodeScanningAlertAppearedInBranchEvent;
- "code_scanning_alert.closed_by_user": CodeScanningAlertClosedByUserEvent;
- "code_scanning_alert.created": CodeScanningAlertCreatedEvent;
- "code_scanning_alert.fixed": CodeScanningAlertFixedEvent;
- "code_scanning_alert.reopened": CodeScanningAlertReopenedEvent;
- "code_scanning_alert.reopened_by_user": CodeScanningAlertReopenedByUserEvent;
- commit_comment: CommitCommentEvent;
- "commit_comment.created": CommitCommentCreatedEvent;
- content_reference: ContentReferenceEvent;
- "content_reference.created": ContentReferenceCreatedEvent;
- create: CreateEvent;
- delete: DeleteEvent;
- deploy_key: DeployKeyEvent;
- "deploy_key.created": DeployKeyCreatedEvent;
- "deploy_key.deleted": DeployKeyDeletedEvent;
- deployment: DeploymentEvent;
- "deployment.created": DeploymentCreatedEvent;
- deployment_status: DeploymentStatusEvent;
- "deployment_status.created": DeploymentStatusCreatedEvent;
- fork: ForkEvent;
- github_app_authorization: GithubAppAuthorizationEvent;
- "github_app_authorization.revoked": GithubAppAuthorizationRevokedEvent;
- gollum: GollumEvent;
- installation: InstallationEvent;
- "installation.created": InstallationCreatedEvent;
- "installation.deleted": InstallationDeletedEvent;
- "installation.new_permissions_accepted": InstallationNewPermissionsAcceptedEvent;
- "installation.suspend": InstallationSuspendEvent;
- "installation.unsuspend": InstallationUnsuspendEvent;
- installation_repositories: InstallationRepositoriesEvent;
- "installation_repositories.added": InstallationRepositoriesAddedEvent;
- "installation_repositories.removed": InstallationRepositoriesRemovedEvent;
- issue_comment: IssueCommentEvent;
- "issue_comment.created": IssueCommentCreatedEvent;
- "issue_comment.deleted": IssueCommentDeletedEvent;
- "issue_comment.edited": IssueCommentEditedEvent;
- issues: IssuesEvent;
- "issues.assigned": IssuesAssignedEvent;
- "issues.closed": IssuesClosedEvent;
- "issues.deleted": IssuesDeletedEvent;
- "issues.demilestoned": IssuesDemilestonedEvent;
- "issues.edited": IssuesEditedEvent;
- "issues.labeled": IssuesLabeledEvent;
- "issues.locked": IssuesLockedEvent;
- "issues.milestoned": IssuesMilestonedEvent;
- "issues.opened": IssuesOpenedEvent;
- "issues.pinned": IssuesPinnedEvent;
- "issues.reopened": IssuesReopenedEvent;
- "issues.transferred": IssuesTransferredEvent;
- "issues.unassigned": IssuesUnassignedEvent;
- "issues.unlabeled": IssuesUnlabeledEvent;
- "issues.unlocked": IssuesUnlockedEvent;
- "issues.unpinned": IssuesUnpinnedEvent;
- label: LabelEvent;
- "label.created": LabelCreatedEvent;
- "label.deleted": LabelDeletedEvent;
- "label.edited": LabelEditedEvent;
- marketplace_purchase: MarketplacePurchaseEvent;
- "marketplace_purchase.cancelled": MarketplacePurchaseCancelledEvent;
- "marketplace_purchase.changed": MarketplacePurchaseChangedEvent;
- "marketplace_purchase.pending_change": MarketplacePurchasePendingChangeEvent;
- "marketplace_purchase.pending_change_cancelled": MarketplacePurchasePendingChangeCancelledEvent;
- "marketplace_purchase.purchased": MarketplacePurchasePurchasedEvent;
- member: MemberEvent;
- "member.added": MemberAddedEvent;
- "member.edited": MemberEditedEvent;
- "member.removed": MemberRemovedEvent;
- membership: MembershipEvent;
- "membership.added": MembershipAddedEvent;
- "membership.removed": MembershipRemovedEvent;
- meta: MetaEvent;
- "meta.deleted": MetaDeletedEvent;
- milestone: MilestoneEvent;
- "milestone.closed": MilestoneClosedEvent;
- "milestone.created": MilestoneCreatedEvent;
- "milestone.deleted": MilestoneDeletedEvent;
- "milestone.edited": MilestoneEditedEvent;
- "milestone.opened": MilestoneOpenedEvent;
- org_block: OrgBlockEvent;
- "org_block.blocked": OrgBlockBlockedEvent;
- "org_block.unblocked": OrgBlockUnblockedEvent;
- organization: OrganizationEvent;
- "organization.deleted": OrganizationDeletedEvent;
- "organization.member_added": OrganizationMemberAddedEvent;
- "organization.member_invited": OrganizationMemberInvitedEvent;
- "organization.member_removed": OrganizationMemberRemovedEvent;
- "organization.renamed": OrganizationRenamedEvent;
- package: PackageEvent;
- "package.published": PackagePublishedEvent;
- "package.updated": PackageUpdatedEvent;
- page_build: PageBuildEvent;
- ping: PingEvent;
- project: ProjectEvent;
- "project.closed": ProjectClosedEvent;
- "project.created": ProjectCreatedEvent;
- "project.deleted": ProjectDeletedEvent;
- "project.edited": ProjectEditedEvent;
- "project.reopened": ProjectReopenedEvent;
- project_card: ProjectCardEvent;
- "project_card.converted": ProjectCardConvertedEvent;
- "project_card.created": ProjectCardCreatedEvent;
- "project_card.deleted": ProjectCardDeletedEvent;
- "project_card.edited": ProjectCardEditedEvent;
- "project_card.moved": ProjectCardMovedEvent;
- project_column: ProjectColumnEvent;
- "project_column.created": ProjectColumnCreatedEvent;
- "project_column.deleted": ProjectColumnDeletedEvent;
- "project_column.edited": ProjectColumnEditedEvent;
- "project_column.moved": ProjectColumnMovedEvent;
- public: PublicEvent;
- pull_request: PullRequestEvent;
- "pull_request.assigned": PullRequestAssignedEvent;
- "pull_request.auto_merge_disabled": PullRequestAutoMergeDisabledEvent;
- "pull_request.auto_merge_enabled": PullRequestAutoMergeEnabledEvent;
- "pull_request.closed": PullRequestClosedEvent;
- "pull_request.converted_to_draft": PullRequestConvertedToDraftEvent;
- "pull_request.edited": PullRequestEditedEvent;
- "pull_request.labeled": PullRequestLabeledEvent;
- "pull_request.locked": PullRequestLockedEvent;
- "pull_request.opened": PullRequestOpenedEvent;
- "pull_request.ready_for_review": PullRequestReadyForReviewEvent;
- "pull_request.reopened": PullRequestReopenedEvent;
- "pull_request.review_request_removed": PullRequestReviewRequestRemovedEvent;
- "pull_request.review_requested": PullRequestReviewRequestedEvent;
- "pull_request.synchronize": PullRequestSynchronizeEvent;
- "pull_request.unassigned": PullRequestUnassignedEvent;
- "pull_request.unlabeled": PullRequestUnlabeledEvent;
- "pull_request.unlocked": PullRequestUnlockedEvent;
- pull_request_review: PullRequestReviewEvent;
- "pull_request_review.dismissed": PullRequestReviewDismissedEvent;
- "pull_request_review.edited": PullRequestReviewEditedEvent;
- "pull_request_review.submitted": PullRequestReviewSubmittedEvent;
- pull_request_review_comment: PullRequestReviewCommentEvent;
- "pull_request_review_comment.created": PullRequestReviewCommentCreatedEvent;
- "pull_request_review_comment.deleted": PullRequestReviewCommentDeletedEvent;
- "pull_request_review_comment.edited": PullRequestReviewCommentEditedEvent;
- push: PushEvent;
- release: ReleaseEvent;
- "release.created": ReleaseCreatedEvent;
- "release.deleted": ReleaseDeletedEvent;
- "release.edited": ReleaseEditedEvent;
- "release.prereleased": ReleasePrereleasedEvent;
- "release.published": ReleasePublishedEvent;
- "release.released": ReleaseReleasedEvent;
- "release.unpublished": ReleaseUnpublishedEvent;
- repository: RepositoryEvent;
- "repository.archived": RepositoryArchivedEvent;
- "repository.created": RepositoryCreatedEvent;
- "repository.deleted": RepositoryDeletedEvent;
- "repository.edited": RepositoryEditedEvent;
- "repository.privatized": RepositoryPrivatizedEvent;
- "repository.publicized": RepositoryPublicizedEvent;
- "repository.renamed": RepositoryRenamedEvent;
- "repository.transferred": RepositoryTransferredEvent;
- "repository.unarchived": RepositoryUnarchivedEvent;
- repository_dispatch: RepositoryDispatchEvent;
- "repository_dispatch.on-demand-test": RepositoryDispatchOnDemandTestEvent;
- repository_import: RepositoryImportEvent;
- repository_vulnerability_alert: RepositoryVulnerabilityAlertEvent;
- "repository_vulnerability_alert.create": RepositoryVulnerabilityAlertCreateEvent;
- "repository_vulnerability_alert.dismiss": RepositoryVulnerabilityAlertDismissEvent;
- "repository_vulnerability_alert.resolve": RepositoryVulnerabilityAlertResolveEvent;
- secret_scanning_alert: SecretScanningAlertEvent;
- "secret_scanning_alert.created": SecretScanningAlertCreatedEvent;
- "secret_scanning_alert.reopened": SecretScanningAlertReopenedEvent;
- "secret_scanning_alert.resolved": SecretScanningAlertResolvedEvent;
- security_advisory: SecurityAdvisoryEvent;
- "security_advisory.performed": SecurityAdvisoryPerformedEvent;
- "security_advisory.published": SecurityAdvisoryPublishedEvent;
- "security_advisory.updated": SecurityAdvisoryUpdatedEvent;
- sponsorship: SponsorshipEvent;
- "sponsorship.cancelled": SponsorshipCancelledEvent;
- "sponsorship.created": SponsorshipCreatedEvent;
- "sponsorship.edited": SponsorshipEditedEvent;
- "sponsorship.pending_cancellation": SponsorshipPendingCancellationEvent;
- "sponsorship.pending_tier_change": SponsorshipPendingTierChangeEvent;
- "sponsorship.tier_changed": SponsorshipTierChangedEvent;
- star: StarEvent;
- "star.created": StarCreatedEvent;
- "star.deleted": StarDeletedEvent;
- status: StatusEvent;
- team: TeamEvent;
- "team.added_to_repository": TeamAddedToRepositoryEvent;
- "team.created": TeamCreatedEvent;
- "team.deleted": TeamDeletedEvent;
- "team.edited": TeamEditedEvent;
- "team.removed_from_repository": TeamRemovedFromRepositoryEvent;
- team_add: TeamAddEvent;
- watch: WatchEvent;
- "watch.started": WatchStartedEvent;
- workflow_dispatch: WorkflowDispatchEvent;
- workflow_run: WorkflowRunEvent;
- "workflow_run.completed": WorkflowRunCompletedEvent;
- "workflow_run.requested": WorkflowRunRequestedEvent;
-}
diff --git a/src/generated/webhook-names.ts b/src/generated/webhook-names.ts
index ac1f63e8..772d0521 100644
--- a/src/generated/webhook-names.ts
+++ b/src/generated/webhook-names.ts
@@ -2,8 +2,6 @@
// make edits in scripts/generate-types.ts
export const emitterEventNames = [
- "*",
- "error",
"check_run",
"check_run.completed",
"check_run.created",
@@ -208,4 +206,4 @@ export const emitterEventNames = [
"workflow_run",
"workflow_run.completed",
"workflow_run.requested",
-];
+] as const;
diff --git a/src/index.ts b/src/index.ts
index e76ebe07..8c645f5a 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -2,16 +2,11 @@ import { IncomingMessage, ServerResponse } from "http";
import { createEventHandler } from "./event-handler/index";
import { createMiddleware } from "./middleware/index";
import { middleware } from "./middleware/middleware";
-import {
- verifyAndReceive,
- WebhookEventName,
-} from "./middleware/verify-and-receive";
+import { verifyAndReceive } from "./middleware/verify-and-receive";
import { sign } from "./sign/index";
import {
- EmitterAnyEvent,
- EmitterEventName,
EmitterWebhookEvent,
- EmitterWebhookEventMap,
+ EmitterWebhookEventName,
HandlerFunction,
Options,
State,
@@ -27,13 +22,13 @@ class Webhooks<
> {
public sign: (payload: string | object) => string;
public verify: (eventPayload: string | object, signature: string) => boolean;
- public on: (
+ public on: (
event: E | E[],
callback: HandlerFunction
) => void;
- public onAny: (callback: (event: EmitterAnyEvent) => any) => void;
+ public onAny: (callback: (event: EmitterWebhookEvent) => any) => void;
public onError: (callback: (event: WebhookEventHandlerError) => any) => void;
- public removeListener: (
+ public removeListener: (
event: E | E[],
callback: HandlerFunction
) => void;
@@ -44,10 +39,10 @@ class Webhooks<
next?: (err?: any) => void
) => void | Promise;
public verifyAndReceive: (
- options: EmitterWebhookEventMap[WebhookEventName] & { signature: string }
+ options: EmitterWebhookEvent & { signature: string }
) => Promise;
- constructor(options?: Options) {
+ constructor(options?: Options) {
if (!options || !options.secret) {
throw new Error("[@octokit/webhooks] options.secret required");
}
@@ -73,14 +68,6 @@ class Webhooks<
const createWebhooksApi = Webhooks.prototype.constructor;
-export { EventPayloads } from "./generated/event-payloads";
-export {
- EmitterEventMap,
- EmitterEventName,
- EmitterEventMap as EventTypesPayload,
- EmitterEventName as WebhookEvents,
-} from "./types";
-
export {
createEventHandler,
createMiddleware,
diff --git a/src/middleware/middleware.ts b/src/middleware/middleware.ts
index b5b8f11a..46976b1c 100644
--- a/src/middleware/middleware.ts
+++ b/src/middleware/middleware.ts
@@ -1,4 +1,4 @@
-import { EventPayloadMap } from "@octokit/webhooks-definitions/schema";
+import { WebhookEventName } from "@octokit/webhooks-definitions/schema";
import { isntWebhook } from "./isnt-webhook";
import { getMissingHeaders } from "./get-missing-headers";
import { getPayload } from "./get-payload";
@@ -7,8 +7,6 @@ import { debug } from "debug";
import { IncomingMessage, ServerResponse } from "http";
import { State, WebhookEventHandlerError } from "../types";
-export type WebhookEventName = keyof EventPayloadMap;
-
const debugWebhooks = debug("webhooks:receiver");
export function middleware(
@@ -21,7 +19,7 @@ export function middleware(
// the next callback is set when used as an express middleware. That allows
// it to define custom routes like /my/custom/page while the webhooks are
// expected to be sent to the / root path. Otherwise the root path would
- // match all requests and would make it impossible to define custom rooutes
+ // match all requests and would make it impossible to define custom routes
if (next) {
next();
return;
diff --git a/src/middleware/verify-and-receive.ts b/src/middleware/verify-and-receive.ts
index f795577f..9f13fdb9 100644
--- a/src/middleware/verify-and-receive.ts
+++ b/src/middleware/verify-and-receive.ts
@@ -1,12 +1,9 @@
-import { EventPayloadMap } from "@octokit/webhooks-definitions/schema";
+import { EmitterWebhookEvent, State } from "../types";
import { verify } from "../verify/index";
-import { State, EmitterWebhookEventMap } from "../types";
-
-export type WebhookEventName = keyof EventPayloadMap;
export function verifyAndReceive(
state: State,
- event: EmitterWebhookEventMap[WebhookEventName] & { signature: string }
+ event: EmitterWebhookEvent & { signature: string }
): any {
// verify will validate that the secret is not undefined
const matchesSignature = verify(
diff --git a/src/types.ts b/src/types.ts
index 50bd481a..3b090a9e 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1,46 +1,32 @@
-import type { RequestError } from "@octokit/request-error";
-import type { Schema } from "@octokit/webhooks-definitions/schema";
-import type { EmitterEventWebhookPayloadMap } from "./generated/get-webhook-payload-type-from-event";
-
-type EmitterEventPayloadMap = { "*": Schema } & EmitterEventWebhookPayloadMap;
-
-export type EmitterWebhookEventMap = {
- [K in keyof EmitterEventPayloadMap]: BaseWebhookEvent;
-};
-
-export type EmitterWebhookEventName = keyof EmitterWebhookEventMap;
-export type EmitterWebhookEvent = EmitterWebhookEventMap[EmitterWebhookEventName];
-
-/**
- * A map of all possible emitter events to their event type.
- * AKA "if the emitter emits x, the handler will be passed y"
- */
-export type EmitterEventMap = EmitterWebhookEventMap & {
- error: WebhookEventHandlerError;
-};
-export type EmitterEventName = keyof EmitterEventMap;
-export type EmitterEvent = EmitterEventMap[EmitterEventName];
-
-export type EmitterAnyEvent = EmitterWebhookEventMap["*"];
-
-export type ToWebhookEvent<
- TEmitterEvent extends string
-> = TEmitterEvent extends `${infer TWebhookEvent}.${string}`
- ? TWebhookEvent
- : TEmitterEvent;
-
-interface BaseWebhookEvent<
- TName extends keyof EmitterEventPayloadMap = keyof EmitterEventPayloadMap
-> {
+import { RequestError } from "@octokit/request-error";
+import type {
+ WebhookEventMap,
+ WebhookEventName,
+} from "@octokit/webhooks-definitions/schema";
+import type { emitterEventNames } from "./generated/webhook-names";
+
+export type EmitterWebhookEventName = typeof emitterEventNames[number];
+export type EmitterWebhookEvent<
+ TEmitterEvent extends EmitterWebhookEventName = EmitterWebhookEventName
+> = TEmitterEvent extends `${infer TWebhookEvent}.${infer TAction}`
+ ? BaseWebhookEvent> & {
+ payload: { action: TAction };
+ }
+ : BaseWebhookEvent>;
+
+interface BaseWebhookEvent {
id: string;
- name: ToWebhookEvent;
- payload: EmitterEventPayloadMap[TName];
+ name: TName;
+ payload: WebhookEventMap[TName];
}
-export interface Options {
+export interface Options<
+ T extends EmitterWebhookEvent,
+ TTransformed = unknown
+> {
path?: string;
secret?: string;
- transform?: TransformMethod;
+ transform?: TransformMethod;
}
type TransformMethod = (
@@ -48,17 +34,12 @@ type TransformMethod = (
) => V | PromiseLike;
type EnsureArray = T extends any[] ? T : [T];
-// type MaybeArray = T | T[];
export type HandlerFunction<
- TName extends EmitterEventName | EmitterEventName[],
+ TName extends EmitterWebhookEventName | EmitterWebhookEventName[],
TTransformed
> = (
- event: EmitterEventMap[Extract<
- EmitterEventName,
- EnsureArray[number]
- >] &
- TTransformed
+ event: EmitterWebhookEvent[number]> & TTransformed
) => any;
type Hooks = {
@@ -71,24 +52,13 @@ export interface State extends Options {
}
/**
- * Error object with optional poperties coming from `octokit.request` errors
+ * Error object with optional properties coming from `octokit.request` errors
*/
-export type WebhookError = Error &
- Partial & {
- /**
- * @deprecated `error.event` is deprecated. Use the `.event` property on the aggregated error instance
- */
- event: EmitterWebhookEvent;
- };
+export type WebhookError = Error & Partial;
// todo: rename to "EmitterErrorEvent"
export interface WebhookEventHandlerError extends AggregateError {
event: EmitterWebhookEvent;
-
- /**
- * @deprecated `error.errors` is deprecated. Use `Array.from(error)`. See https://npm.im/aggregate-error
- */
- errors: WebhookError[];
}
/**
diff --git a/test/integration/event-handler-test.ts b/test/integration/event-handler-test.ts
index 681f33d9..8b5e15b1 100644
--- a/test/integration/event-handler-test.ts
+++ b/test/integration/event-handler-test.ts
@@ -2,7 +2,7 @@ import { createEventHandler } from "../../src/event-handler";
import { EmitterWebhookEvent, WebhookEventHandlerError } from "../../src/types";
import { installationCreatedPayload, pushEventPayload } from "../fixtures";
-test("events", (done) => {
+test("events", async () => {
const eventHandler = createEventHandler({});
const hooksCalled: string[] = [];
@@ -44,49 +44,45 @@ test("events", (done) => {
// Argument of type '"unknown"' is not assignable to parameter of type ...
eventHandler.removeListener("unknown", () => {});
- eventHandler
- .receive({
- id: "123",
- name: "push",
- payload: pushEventPayload,
- })
+ await eventHandler.receive({
+ id: "123",
+ name: "push",
+ payload: pushEventPayload,
+ });
- .then(() => {
- return eventHandler.receive({
- id: "456",
- name: "installation",
- payload: installationCreatedPayload,
- });
- })
-
- .then(() => {
- expect(hooksCalled).toStrictEqual([
- "hook2",
- "* (push)",
- "hook1",
- "installation.created",
- "installation",
- "* (installation)",
- ]);
+ await eventHandler.receive({
+ id: "456",
+ name: "installation",
+ payload: installationCreatedPayload,
+ });
- eventHandler.onError((error: WebhookEventHandlerError) => {
- expect(error.event.payload).toBeTruthy();
- // t.pass("error event triggered");
- expect(error.message).toMatch(/oops/);
- });
+ expect(hooksCalled).toMatchInlineSnapshot(`
+ Array [
+ "hook2",
+ "* (push)",
+ "hook1",
+ "installation.created",
+ "installation",
+ "* (installation)",
+ ]
+ `);
+});
- eventHandler.on("push", () => {
- throw new Error("oops");
- });
+describe("when a handler throws an error", () => {
+ it("throws an aggregated error", async () => {
+ const eventHandler = createEventHandler({});
+
+ eventHandler.on("push", () => {
+ throw new Error("oops");
+ });
- return eventHandler.receive({
+ try {
+ await eventHandler.receive({
id: "123",
name: "push",
payload: pushEventPayload,
});
- })
-
- .catch((error) => {
+ } catch (error) {
expect(error.message).toMatch(/oops/);
const errors = Array.from(error);
@@ -95,10 +91,38 @@ test("events", (done) => {
expect((Array.from(error) as { message: string }[])[0].message).toBe(
"oops"
);
- })
- .catch((e) => expect(e instanceof Error).toBeTruthy())
- .finally(done);
+ expect(error instanceof Error).toBeTruthy();
+ }
+ });
+
+ it("calls any registered error handlers", async () => {
+ expect.assertions(2);
+ const eventHandler = createEventHandler({});
+
+ eventHandler.on("push", () => {
+ throw new Error("oops");
+ });
+
+ return new Promise(async (resolve) => {
+ eventHandler.onError((error: WebhookEventHandlerError) => {
+ expect(error.event.payload).toBeTruthy();
+ expect(error.message).toMatch(/oops/);
+
+ resolve();
+ });
+
+ try {
+ await eventHandler.receive({
+ id: "123",
+ name: "push",
+ payload: pushEventPayload,
+ });
+ } catch {
+ // ignore any errors
+ }
+ });
+ });
});
test("options.transform", (done) => {
@@ -143,7 +167,7 @@ test("async options.transform", (done) => {
});
});
-test("multiple errors in same event handler", (done) => {
+test("multiple errors in same event handler", async () => {
expect.assertions(2);
const eventHandler = createEventHandler({});
@@ -156,18 +180,16 @@ test("multiple errors in same event handler", (done) => {
throw new Error("oops");
});
- eventHandler
- .receive({
+ try {
+ await eventHandler.receive({
id: "123",
name: "push",
payload: pushEventPayload,
- })
-
- .catch((error) => {
- expect(error.message).toMatch("oops");
- expect(Array.from(error).length).toBe(2);
- })
+ });
+ } catch (error) {
+ expect(error.message).toMatch("oops");
+ expect(Array.from(error).length).toBe(2);
- .catch((e) => expect(e instanceof Error).toBeTruthy())
- .finally(done);
+ expect(error instanceof Error);
+ }
});
diff --git a/test/integration/sign-test.ts b/test/integration/sign-test.ts
index 901f5c71..120fe5cd 100644
--- a/test/integration/sign-test.ts
+++ b/test/integration/sign-test.ts
@@ -27,7 +27,7 @@ test("sign({secret, algorithm}) with invalid algorithm throws", () => {
});
describe("with eventPayload as object", () => {
- describe("resturns expected sha1 signature", () => {
+ describe("returns expected sha1 signature", () => {
test("sign(secret, eventPayload)", () => {
const signature = sign(secret, eventPayload);
expect(signature).toBe("sha1=d03207e4b030cf234e3447bac4d93add4c6643d8");
@@ -44,7 +44,7 @@ describe("with eventPayload as object", () => {
});
});
- describe("resturns expected sha256 signature", () => {
+ describe("returns expected sha256 signature", () => {
test("sign({secret, algorithm}, eventPayload)", () => {
const signature = sign({ secret, algorithm: "sha256" }, eventPayload);
expect(signature).toBe(
@@ -55,7 +55,7 @@ describe("with eventPayload as object", () => {
});
describe("with eventPayload as string", () => {
- describe("resturns expected sha1 signature", () => {
+ describe("returns expected sha1 signature", () => {
test("sign(secret, eventPayload)", () => {
const signature = sign(secret, JSON.stringify(eventPayload));
expect(signature).toBe("sha1=d03207e4b030cf234e3447bac4d93add4c6643d8");
diff --git a/test/typescript-validate.ts b/test/typescript-validate.ts
index dc8da134..cd0fc12d 100644
--- a/test/typescript-validate.ts
+++ b/test/typescript-validate.ts
@@ -5,10 +5,8 @@ import {
createWebhooksApi,
sign,
verify,
- EventPayloads,
EmitterWebhookEvent,
WebhookError,
- WebhookEvents,
} from "../src/index";
import { createServer } from "http";
import { HandlerFunction, EmitterWebhookEventName } from "../src/types";
@@ -18,26 +16,11 @@ import { HandlerFunction, EmitterWebhookEventName } from "../src/types";
// ************************************************************
const fn = (webhookEvent: EmitterWebhookEvent) => {
- if (webhookEvent.name === "*") {
- if (
- "action" in webhookEvent.payload &&
- webhookEvent.payload.action === "completed"
- ) {
- console.log(webhookEvent.payload.sender);
- }
- }
// @ts-expect-error TS2367:
- // This condition will always return 'false' since the types '"*" | "check_run" | ... many more ... | "workflow_run"' and '"check_run.completed"' have no overlap.
+ // This condition will always return 'false' since the types '"check_run" | ... many more ... | "workflow_run"' and '"check_run.completed"' have no overlap.
if (webhookEvent.name === "check_run.completed") {
//
}
-
- if (webhookEvent.name === "*") {
- // @ts-expect-error TS2339:
- // Property 'action' does not exist on type 'Schema'.
- // Property 'action' does not exist on type 'CreateEvent'.
- console.log(webhookEvent.payload.action);
- }
};
declare const on: (
@@ -66,33 +49,27 @@ on("code_scanning_alert.fixed", (event) => {
console.log("a run was completed!");
}
+ // @ts-expect-error TS2367:
+ // This condition will always return 'false' since the types '"fixed"' and '"completed"' have no overlap.
+ if (event.payload.action === "random-string") {
+ console.log("a run was completed!");
+ }
+
fn(event);
});
-const myEventName: WebhookEvents = "check_run.completed";
-
-const myEventPayload: EventPayloads.WebhookPayloadCheckRunCheckRunOutput = {
- annotations_count: 0,
- annotations_url: "",
- summary: "",
- text: "",
- title: "",
-};
-
-console.log(myEventName, myEventPayload);
-
export default async function () {
// Check empty constructor
new Webhooks();
// Check that all options are optional except for secret
new Webhooks({
- secret: "bleh",
+ secret: "blah",
});
// Check all supported options
- const webhooks = new Webhooks({
- secret: "bleh",
+ const webhooks = new Webhooks({
+ secret: "blah",
path: "/webhooks",
transform: (event) => {
console.log(event.payload);
@@ -100,12 +77,12 @@ export default async function () {
},
});
- // Check named expors of new API work
+ // Check named exports of new API work
createWebhooksApi({
- secret: "bleh",
+ secret: "blah",
});
- createEventHandler({ secret: "bleh" });
+ createEventHandler({ secret: "blah" });
createMiddleware({
secret: "mysecret",
@@ -119,13 +96,6 @@ export default async function () {
verify("randomSecret", {}, "randomSignature");
- // This is deprecated usage
- webhooks.on("*", ({ id, name, payload }) => {
- console.log(name, "event received", id);
- const sig = webhooks.sign(payload);
- webhooks.verify(payload, sig);
- });
-
webhooks.onAny(({ id, name, payload }) => {
console.log(name, "event received", id);
const sig = webhooks.sign(payload);
@@ -210,15 +180,6 @@ export default async function () {
console.log(what.foo);
});
- // This is deprecated usage
- webhooks.on("error", (error) => {
- console.log(error.event.name);
- const [firstError] = Array.from(error);
- console.log(firstError.status);
- console.log(firstError.headers);
- console.log(firstError.request);
- });
-
webhooks.onError((error) => {
console.log(error.event.name);
const [firstError] = Array.from(error);
@@ -234,13 +195,3 @@ export function webhookErrorTest(error: WebhookError) {
const { request } = error;
console.log(request);
}
-
-// ************************************************************
-// DEPRECATIONS RETRO-COMPATIBILITY
-// ************************************************************
-
-export function webhookErrorTestDeprecated(error: WebhookError) {
- const { event, request } = error;
- console.log(event);
- console.log(request);
-}
diff --git a/test/unit/event-handler-on-test.ts b/test/unit/event-handler-on-test.ts
index 67776983..f2d8313c 100644
--- a/test/unit/event-handler-on-test.ts
+++ b/test/unit/event-handler-on-test.ts
@@ -1,5 +1,5 @@
import { receiverOn } from "../../src/event-handler/on";
-import { State } from "../../src/types";
+import { EmitterWebhookEventName, State } from "../../src/types";
function noop() {}
@@ -22,24 +22,18 @@ test("receiver.on with invalid event name", () => {
);
});
-test("receiver.on with event name of '*' logs deprecation notice", () => {
- const consoleWarnSpy = jest.spyOn(console, "warn").mockImplementation(noop);
-
- receiverOn(state, "*", noop);
-
- expect(consoleWarnSpy).toHaveBeenCalledTimes(1);
- expect(consoleWarnSpy).toHaveBeenLastCalledWith(
- 'Using the "*" event with the regular Webhooks.on() function is deprecated. Please use the Webhooks.onAny() method instead'
+test("receiver.on with event name of '*' throws an error", () => {
+ expect(() =>
+ receiverOn(state, "*" as EmitterWebhookEventName, noop)
+ ).toThrowError(
+ 'Using the "*" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.onAny() method instead'
);
});
-test("receiver.on with event name of 'error' logs deprecation notice", () => {
- const consoleWarnSpy = jest.spyOn(console, "warn").mockImplementation(noop);
-
- receiverOn(state, "error", noop);
-
- expect(consoleWarnSpy).toHaveBeenCalledTimes(1);
- expect(consoleWarnSpy).toHaveBeenLastCalledWith(
- 'Using the "error" event with the regular Webhooks.on() function is deprecated. Please use the Webhooks.onError() method instead'
+test("receiver.on with event name of 'error' throws an error", () => {
+ expect(() =>
+ receiverOn(state, "error" as EmitterWebhookEventName, noop)
+ ).toThrowError(
+ 'Using the "error" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.onError() method instead'
);
});
diff --git a/test/unit/middleware-test.ts b/test/unit/middleware-test.ts
index 8e8155b6..cf82910c 100644
--- a/test/unit/middleware-test.ts
+++ b/test/unit/middleware-test.ts
@@ -32,7 +32,7 @@ describe("when does a timeout on retrieving the payload", () => {
jest.useFakeTimers();
});
- test("successfully, does NOT respone.end(ok)", async () => {
+ test("successfully, does NOT response.end(ok)", async () => {
const responseMock = ({ end: jest.fn() } as unknown) as ServerResponse;
const next = jest.fn();
@@ -61,7 +61,7 @@ describe("when does a timeout on retrieving the payload", () => {
expect(responseMock.end).not.toHaveBeenCalledWith("ok\n");
});
- test("failing, does NOT respone.end(ok)", async () => {
+ test("failing, does NOT response.end(ok)", async () => {
const responseMock = ({ end: jest.fn() } as unknown) as ServerResponse;
const next = jest.fn();