On this page

On this page

GitHub Webhooks

This guide walks you through setting up SpidyLabs to receive and inspect GitHub webhook events.

Step 1: Create a Bin

Sign in to SpidyLabs and create a new bin. Name it something descriptive like "github-webhooks".

Your webhook URL will be:

https://spidylabs.com/hook/github-webhooks

Step 2: Add Webhook in GitHub

Repository Webhooks

  1. Go to your repository on GitHub
  2. Navigate to Settings → Webhooks
  3. Click Add webhook
  4. Set the Payload URL to your SpidyLabs bin URL
  5. Set Content type to application/json (recommended)
  6. Enter a Secret (optional, for signature verification)
  7. Select events: "Let me select individual events" or "Send me everything"
  8. Click Add webhook

Organization Webhooks

  1. Go to your organization's Settings → Webhooks
  2. Follow the same steps as above

Step 3: Trigger an Event

Perform an action that triggers your selected events:

  • Push a commit
  • Open an issue
  • Create a pull request
  • Star the repository

Step 4: Inspect the Payload

Click the request in SpidyLabs to see:

Important Headers

HeaderDescription
X-GitHub-EventEvent type (e.g., push, pull_request)
X-GitHub-DeliveryUnique delivery ID
X-Hub-Signature-256HMAC-SHA256 signature (if secret configured)
Content-TypeAlways application/json if configured

Example Push Event Body

{
  "ref": "refs/heads/main",
  "repository": {
    "full_name": "octocat/Hello-World"
  },
  "pusher": {
    "name": "octocat",
    "email": "octocat@github.com"
  },
  "commits": [
    {
      "id": "abc123",
      "message": "Fix bug in login flow",
      "author": { "name": "Octocat" }
    }
  ]
}

Signature Verification

To verify GitHub webhook signatures:

  1. Copy the Secret you set when creating the webhook
  2. Go to your bin's settings in SpidyLabs
  3. Under Signature Verification, select "GitHub" and paste the secret
  4. New requests will show verification status

Common GitHub Events

EventTrigger
pushPush to a branch
pull_requestPR opened, closed, or updated
issuesIssue opened, closed, or updated
releaseRelease published
workflow_runGitHub Action completed
starRepository starred

Tips

  • Use search to filter by event type (search for the X-GitHub-Event header value)
  • Compare payloads from pull_request.opened vs pull_request.closed using request diff
  • GitHub retries failed deliveries — use auto-response with error codes to test retry behavior