linear-webhook
v0.3.1
Published
Webhook handler for Linear
Downloads
2,144
Readme
linear-webhook
Webhook handler for Linear.
Getting started
Use the package manager npm to install linear-webhook.
Install linear-webhook
npm i linear-webhook
Example code
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