GitHub fixture
pull_request (action: opened)
Fires when a pull request is opened. The same webhook event covers many actions (opened, closed, synchronize, review_requested, etc.) — branch on the action field.
When does it fire?
A user opens a pull request, including draft PRs and PRs converted from drafts. To handle other PR lifecycle events, subscribe to the same event and switch on `action`.
Request headers
Content-Type: application/json
X-GitHub-Event: pull_request
X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958
X-Hub-Signature-256: sha256=292e1ce3568fdb4d2e6e7e9bd1f63cf7b6d8e2a6d8e1c0b2a3d4f5e6c7b8a9d0Payload
{
"action": "opened",
"number": 42,
"pull_request": {
"id": 1234567890,
"number": 42,
"title": "Add webhook fixture library",
"state": "open",
"draft": false,
"user": {
"login": "octocat",
"id": 583231,
"type": "User"
},
"body": "Adds /fixtures/* pages with real webhook payload examples.",
"head": {
"ref": "feature/fixtures",
"sha": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
},
"base": {
"ref": "main",
"sha": "f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1"
},
"created_at": "2026-05-13T12:00:00Z"
},
"repository": {
"id": 99999,
"full_name": "ozers/hooksense",
"private": false
},
"sender": {
"login": "octocat",
"id": 583231
}
}Key fields
actionopened | closed | synchronize | reopened | edited — branch on this.
pull_request.drafttrue for draft PRs — usually skip CI for these.
pull_request.head.shaCommit SHA to run CI against.
X-GitHub-DeliveryUnique per-event ID. Use as your dedup key.
Test it with cURL
Replace your-endpoint with your HookSense endpoint slug — or any URL you want to test against.
curl -X POST https://hooksense.com/w/your-endpoint \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: pull_request" \
-H "X-GitHub-Delivery: 72d3162e-cc78-11e3-81ab-4c9367dc0958" \
-H "X-Hub-Signature-256: sha256=292e1ce3568fdb4d2e6e7e9bd1f63cf7b6d8e2a6d8e1c0b2a3d4f5e6c7b8a9d0" \
-d '{
"action": "opened",
"number": 42,
"pull_request": {
"id": 1234567890,
"number": 42,
"title": "Add webhook fixture library",
"state": "open",
"draft": false,
"user": {
"login": "octocat",
"id": 583231,
"type": "User"
},
"body": "Adds /fixtures/* pages with real webhook payload examples.",
"head": {
"ref": "feature/fixtures",
"sha": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0"
},
"base": {
"ref": "main",
"sha": "f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1"
},
"created_at": "2026-05-13T12:00:00Z"
},
"repository": {
"id": 99999,
"full_name": "ozers/hooksense",
"private": false
},
"sender": {
"login": "octocat",
"id": 583231
}
}'Capture this in HookSense
Fire the cURL above at your HookSense endpoint and inspect the request in real time — with headers, body, signature verification, and replay.
Get a free endpoint