Skip to content
  • Admin rights on the repository or organisation.

  • A secret you generate yourself — GitHub does not create one for you:

    Terminal window
    openssl rand -hex 32

Sources → Create source, name it after the repository, and copy the ingest URL.

Repository Settings → Webhooks → Add webhook (or the same screen under an organisation’s settings):

  • Payload URL — the ingest URL.
  • Content typeapplication/json. Webhooker accepts form encoding too, but JSON is what makes filters on body.… work.
  • Secret — the value you generated above.
  • SSL verification — enabled.
  • Events — “Just the push event”, or Let me select individual events for pull requests, issues, releases and the rest.

In Webhooker: Settings → Authenticate inbound requests → method GitHub → paste the same secret → save.

GitHub signs the body with HMAC-SHA256 and sends it as X-Hub-Signature-256. If you verify the same header in your own handler, the GitHub signature scheme step by step has the code and the constant-time comparison it needs. There is no timestamp in the scheme, so there is no freshness check.

GitHub sends a ping event the moment you save the webhook. It appears in the live tail as verified, and GitHub’s Recent Deliveries tab shows 200.

Destinations → Add destination → Create new, your handler’s URL, Sign outbound requests on. Save.

GitHub puts the event name in a header, so filter on it:

{
"operator": "and",
"rules": [
{ "path": "headers.x-github-event", "op": "in", "value": ["push", "pull_request"] }
]
}

To narrow pushes to one branch, add a body rule:

{ "path": "body.ref", "op": "eq", "value": "refs/heads/main" }

Remember that the sender’s headers are not forwarded to your endpoint — if your handler needs the event type, filter on it per gateway, or read it from the payload.

  1. GitHub Recent Deliveries shows 200.
  2. The Webhooker event is verified.
  3. The delivery is succeeded.
SymptomCause
GitHub shows 401The secrets differ. Re-enter it in Webhooker in full.
Events arrive but filters never matchThe content type is application/x-www-form-urlencoded. Switch GitHub to application/json.
ping arrives, nothing elseThe webhook subscribes to no events you trigger. Check the event selection.
Some events are hugeA push with many commits can exceed 1 MiB and is rejected with 413. Subscribe to fewer event types or handle the API call instead.