webhooks.github() verifies the HMAC-SHA256 signature GitHub sends in x-hub-signature-256 on every request.
/trigger/github.ts
Set up GitHub
-
Start
trigger devor deploy, then copy the endpoint’s Webhook URL from the Webhooks page. - Choose Generate secret on the Trigger.dev endpoint and copy the value. GitHub accepts a secret you choose.
-
Create the webhook. For a repository webhook with the
ghCLI:Useorgs/ORG/hooksfor an organization webhook. For a GitHub App, set the webhook URL and secret in the app’s settings. Set the content type tojson. - Trigger an event in the repository, or use the endpoint’s Test tab, and check the endpoint’s Deliveries tab. See Verify the connection if nothing arrives.

