12.0.3 • Published 5 months ago

@octokit/openapi-webhooks-types-transition v12.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Octokit Webhooks

Generated TypeScript definitions based on GitHub's OpenAPI spec

This package is continously updated based on GitHub's OpenAPI specification

Usage

import {
  WebhookEvent,
  IssuesOpenedEvent,
} from "@octokit/openapi-webhooks-types-transition";

const handleWebhookEvent = (event: WebhookEvent) => {
  if ("action" in event && event.action === "completed") {
    console.log(`${event.sender.login} completed something!`);
  }
};

const handleIssuesOpenedEvent = (event: IssuesOpenedEvent) => {
  console.log(
    `${event.sender.login} opened "${event.issue.title}" on ${event.repository.full_name}`,
  );
};

!IMPORTANT Webhooks Types are expected to be used with the strictNullChecks option enabled in your tsconfig. If you don't have this option enabled, there's the possibility that you get never as the inferred type in some use cases. See octokit/webhooks#395 for details.

See also

LICENSE

MIT

12.0.3

5 months ago

12.0.2

5 months ago

12.0.1

5 months ago

12.0.0

5 months ago

11.0.0

6 months ago

10.4.0

7 months ago

10.3.0

7 months ago

10.1.1

8 months ago

10.1.0

8 months ago

10.0.1

8 months ago

10.0.0

8 months ago

9.1.0

9 months ago

9.0.1

9 months ago

9.0.0

9 months ago

8.5.1

11 months ago

8.5.0

11 months ago

8.4.1

11 months ago