Skip to main content

Receive GitHub webhook

POST/webhooks/github/{webhookId}
Signed request

Proven by X-Hub-Signature-256, not by a session.

POST /webhooks/github/{webhookId} needs no session or CSRF token. ReleaseFlow verifies X-Hub-Signature-256 with that integration's own secret before it reads the payload, and takes the Organization and Project from the integration, never from the payload. It answers:

Read more: Receive GitHub webhooksSource: GitHubWebhookController#receive(opens in new tab)

Path parameters​

NameTypeRequiredNotes
webhookIdstringRequired

Headers​

NameTypeRequiredNotes
X-Hub-Signature-256stringOptional
X-GitHub-EventstringOptional
X-GitHub-DeliverystringOptional

Request body​

application/json · The body is optional.

The provider’s JSON payload, exactly as it was signed.

Response​

Success: 200

FieldTypeRequiredNotes
outcomestringOptional

Errors​

StatusCodeApplies to
400invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUIDAny endpoint
404not_foundno such addressAny endpoint
405method_not_allowedthe address does not take that methodAny endpoint
415unsupported_media_typethe address does not read a body of that typeAny endpoint
500internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind itAny endpoint
400webhook_payload_malformedWebhooks area
401webhook_signature_invalidWebhooks area
413webhook_payload_too_largeWebhooks area
422webhook_repository_mismatchWebhooks area

Request

bash
# Sign the exact bytes of payload.json with the webhook secret (see the guide).
curl -X POST "http://localhost:8080/webhooks/github/$WEBHOOK_ID" \
-H "X-Hub-Signature-256: $X_HUB_SIGNATURE_256" \
-H "X-GitHub-Event: $X_GITHUB_EVENT" \
-H "X-GitHub-Delivery: $X_GITHUB_DELIVERY" \
-H "Content-Type: application/json" \
--data-binary @payload.json

Response

200

Example

{
  "outcome": "<string>"
}