Documentation
¶
Overview ¶
Package githubwebhook contains the pure, transport-free pieces of the GitHub webhook receiver: verifying a delivery's HMAC signature and extracting the repository coordinates from a push payload. Keeping these out of the HTTP handler lets them be unit-tested without a server and keeps the handler thin.
Index ¶
Constants ¶
const DeliveryHeader = "X-GitHub-Delivery"
DeliveryHeader carries GitHub's per-delivery UUID. Logging it lets an operator correlate a server-side log line with the matching entry in the webhook's "Recent Deliveries" list on GitHub.
const EventHeader = "X-GitHub-Event"
EventHeader names the webhook event type (e.g. "push", "ping").
const SignatureHeader = "X-Hub-Signature-256"
SignatureHeader is the request header GitHub signs each delivery with.
Variables ¶
This section is empty.
Functions ¶
func ParsePush ¶
ParsePush extracts the owner and repository name from a push event body. It prefers the explicit owner.login / repository.name fields and falls back to splitting full_name ("owner/repo"). ok is false when the body isn't a recognizable push payload, so the caller can ignore it without erroring.
Types ¶
This section is empty.