webhooks: organization webhooks, owner emails, code standardsVerifiedBrowse files at cf0af88
Gurpal committed 12 days ago · 24 changed files
- Organization admins can manage webhooks at /organizations/:slug/webhooks.
An organization endpoint receives the events of every repository the
organization owns. WebhooksService takes a WebhookOwner, resolved by
ofRepository or ofOrganization after the admin check.
- Every endpoint Ghost turns off, by the breaker or by delivery on a 410,
now emails its admins once: the new webhook_endpoint.disabled_notified_at
column is claimed before sending, so several API instances send one
email. Turning the endpoint back on clears it.
- Code standards: the delivery log and redelivery select the fields they
return instead of reshaping rows, push events carry git's commits as
listCommits returns them, webhook bodies use the API's camelCase, the
owner/repo SQL lives in repositoryFullNameOf, and comments are one line.