GitHub Webhook Payload Reference (Push Event)

When GitHub sends a push webhook, the body is a JSON object describing the ref, commits, repository, and pusher. This page shows the fields you typically need and how they appear inside a Tensorify Webhook Trigger.

Direct answer: Configure the GitHub webhook with content type application/json, verify X-Hub-Signature-256 when you set a secret, and read fields from webhook.body.* in Tensorify (for example webhook.body.repository.full_name and webhook.body.head_commit.message).

Official source: GitHub — Webhook events and payloads (push).


Headers to expect

| Header | Purpose | |--------|--------| | Content-Type | Prefer application/json (set in GitHub webhook settings) | | X-GitHub-Event | Event name, e.g. push | | X-GitHub-Delivery | Unique delivery id (useful for logs / idempotency) | | X-Hub-Signature-256 | HMAC SHA-256 of the body when a secret is configured |

In Tensorify, enable HMAC verification on the Webhook Trigger and set the same secret you entered in GitHub.


Minimal push body (example)

{
  "ref": "refs/heads/main",
  "before": "0000000000000000000000000000000000000000",
  "after": "0a1b2c3d4e5f678901234567890123456789abcd",
  "repository": {
    "id": 123456789,
    "name": "my-repo",
    "full_name": "acme/my-repo",
    "html_url": "https://github.com/acme/my-repo",
    "default_branch": "main"
  },
  "pusher": {
    "name": "octocat",
    "email": "[email protected]"
  },
  "sender": {
    "login": "octocat"
  },
  "compare": "https://github.com/acme/my-repo/compare/0000000...0a1b2c3",
  "commits": [
    {
      "id": "0a1b2c3d4e5f678901234567890123456789abcd",
      "message": "Fix typo in README",
      "timestamp": "2026-10-23T10:00:00Z",
      "url": "https://github.com/acme/my-repo/commit/0a1b2c3d4e5f678901234567890123456789abcd",
      "author": {
        "name": "Octo Cat",
        "email": "[email protected]",
        "username": "octocat"
      }
    }
  ],
  "head_commit": {
    "id": "0a1b2c3d4e5f678901234567890123456789abcd",
    "message": "Fix typo in README",
    "timestamp": "2026-10-23T10:00:00Z",
    "url": "https://github.com/acme/my-repo/commit/0a1b2c3d4e5f678901234567890123456789abcd",
    "author": {
      "name": "Octo Cat",
      "email": "[email protected]",
      "username": "octocat"
    }
  },
  "created": false,
  "deleted": false,
  "forced": false
}

Field map → Tensorify bindings

| Goal | Typical path on webhook.body | |------|--------------------------------| | Branch / tag ref | ref (strip refs/heads/ in Code if needed) | | Repo slug | repository.full_name | | Compare URL | compare | | Latest commit message | head_commit.message | | Commit count | commits.length (Transform/Code) | | Who pushed | pusher.name or sender.login |

Example Transform template:

{
  "repo": "{{ webhook.body.repository.full_name }}",
  "ref": "{{ webhook.body.ref }}",
  "message": "{{ webhook.body.head_commit.message }}",
  "pusher": "{{ webhook.body.pusher.name }}",
  "compare": "{{ webhook.body.compare }}"
}

Content type and retries

  • content_type: Choose application/json in GitHub. Form-encoded bodies are harder to bind in visual workflows.
  • Retries: GitHub redelivers failed deliveries. Make downstream steps safe to run twice, or key off X-GitHub-Delivery.
  • Which events: Start with Just the push event. Add pull_request, workflow_run, etc. only when you need those payloads (shapes differ).

Wire it into a workflow

  1. Webhook automation — push to email — full tutorial
  2. Automation on git commits — Actions vs webhook tradeoff
  3. Webhook Trigger plugin — verification settings
  4. GitHub Trigger plugin — if you use the dedicated GitHub plugin in your workspace

Persona landing: Webhooks on Tensorify.


FAQ

Where is the full schema?
GitHub’s docs are the source of truth; this page lists fields Tensorify workflows use most often.

What about workflow_run / check_suite?
Different event names and bodies. Filter with X-GitHub-Event or separate webhook endpoints per workflow.

Signature verification failed?
Confirm raw body HMAC, sha256= prefix, and identical secret on both sides. See Webhook Trigger docs.

On this page