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
- Go to your repository on GitHub
- Navigate to Settings → Webhooks
- Click Add webhook
- Set the Payload URL to your SpidyLabs bin URL
- Set Content type to
application/json(recommended) - Enter a Secret (optional, for signature verification)
- Select events: "Let me select individual events" or "Send me everything"
- Click Add webhook
Organization Webhooks
- Go to your organization's Settings → Webhooks
- 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
| Header | Description |
|---|---|
X-GitHub-Event | Event type (e.g., push, pull_request) |
X-GitHub-Delivery | Unique delivery ID |
X-Hub-Signature-256 | HMAC-SHA256 signature (if secret configured) |
Content-Type | Always 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:
- Copy the Secret you set when creating the webhook
- Go to your bin's settings in SpidyLabs
- Under Signature Verification, select "GitHub" and paste the secret
- New requests will show verification status
Common GitHub Events
| Event | Trigger |
|---|---|
push | Push to a branch |
pull_request | PR opened, closed, or updated |
issues | Issue opened, closed, or updated |
release | Release published |
workflow_run | GitHub Action completed |
star | Repository starred |
Tips
- Use search to filter by event type (search for the
X-GitHub-Eventheader value) - Compare payloads from
pull_request.openedvspull_request.closedusing request diff - GitHub retries failed deliveries — use auto-response with error codes to test retry behavior