Files
triggerdotdev--trigger.dev/examples/github-webhook/src/index.ts
T
Eric Allam b9bf7033a7 Big overhaul to unify how events works across the different types
Workflow runs are still TODO but are pretty much ready to go
2022-12-23 16:34:42 +00:00

24 lines
569 B
TypeScript

import { Trigger } from "@trigger.dev/sdk";
import { github } from "@trigger.dev/integrations";
const trigger = new Trigger({
id: "github-webhook-9",
name: "GitHub Issue changes for jsonhero-web",
apiKey: "trigger_dev_zC25mKNn6c0q",
endpoint: "ws://localhost:8889/ws",
logLevel: "debug",
on: github.repoIssueEvent({ repo: "apihero-run/jsonhero-web" }),
run: async (event, ctx) => {
await ctx.logger.info(
"Inside the github-webhook workflow, received event",
{
event,
}
);
return event;
},
});
trigger.listen();