linear-webhook
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

linear-webhook

Webhook handler for Linear.

npm version CI codecov

Getting started

Use the package manager npm to install linear-webhook.

Install linear-webhook

npm i linear-webhook

Example code

handlerExample.ts

import { WebhookHandler, CreateIssueWebhook } from "linear-webhook";

const handler = new WebhookHandler();
handler.addCallback<CreateIssueWebhook>("CreateIssueWebhook", (webhook) => {
  console.log("This event is CreateIssueWebhook.");
  console.log(`Action: ${webhook.action}, Type: ${webhook.type}`);
});

(async () => {
  await handler.execCallback(webhook);
})();

output

This event is CreateIssueWebhook.
Action: create, Type: Issue

Readme

Keywords

Package Sidebar

Install

npm i linear-webhook

Weekly Downloads

450

Version

0.3.1

License

MIT

Unpacked Size

20.8 kB

Total Files

12

Last publish

Collaborators

  • korosuke613