Buffer GitHub Webhooks
Batch GitHub webhook events per repository.
Overview
GitHub sends webhooks for pushes, pull requests, issues and more. Webbu can batch them per repository so you process related activity together.
Setup
1. Create a buffer
curl -X POST https://webbu.dev/api/v1/admin/buffers \
-H "Content-Type: application/json" \
-H "X-API-Key: $WEBBU_API_KEY" \
-d '{
"bufferId": "b_github",
"projectId": "p_ci",
"name": "GitHub events",
"groupKey": { "mode": "jsonpath", "path": "$.repository.full_name" },
"batch": { "maxItems": 100, "maxBytes": 1048576, "idleTimeoutMs": 5000, "maxWaitFromFirstMs": 30000 },
"delivery": { "url": "https://your-app.example.com/webhooks/github-batch" }
}'2. Configure GitHub
In your repository (or organization) settings:
- Go to Settings → Webhooks → Add webhook
- Payload URL:
https://webbu.dev/api/v1/ingest/p_ci/b_github - Content type:
application/json. The default,application/x-www-form-urlencoded, doesn't work with Webbu - Choose the events
- Save
Events without a repository field (some organization-level events) are rejected with 400, so select repository events only.
3. Process batches
{
"webbu": { "bufferId": "b_github", "groupKey": "my-org/my-repo", "segment": 0, "…": "…" },
"window": { "firstItemAt": 1767225600000, "lastActivityAt": 1767225603000, "itemsCount": 2 },
"items": [
{ "messageId": "…", "receivedAt": 1767225600000, "payload": { "action": "opened", "pull_request": { "number": 42 }, "repository": { "full_name": "my-org/my-repo" } } },
{ "messageId": "…", "receivedAt": 1767225603000, "payload": { "action": "synchronize", "pull_request": { "number": 42 }, "repository": { "full_name": "my-org/my-repo" } } }
]
}Things to know
- Event type: GitHub puts the event name in the
X-GitHub-Eventheader, which isn't forwarded. Infer the type from the payload (e.g.pull_request,commits) or use one buffer per event type. - Payload size: push payloads can be large, and each started KB uses 1 credit.
- Signatures:
X-Hub-Signature-256can't be verified at your endpoint because Webbu forwards parsed payloads.
Use cases
- Aggregate CI/CD events per repository
- Digest notifications of PR and issue activity
- Process deployment events together