Skip to main content

Webhooks

Webhooks allow you to build or set up integrations which subscribe to certain events on JJHub. When one of those events is triggered, we’ll send a HTTP POST payload to the webhook’s configured URL. Webhooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.

API Endpoints

Create a Webhook

To create a webhook, send a POST request to the hooks endpoint:

Configuration Options

Event Types

JJHub currently supports the following event types:

Payload Format

All webhook payloads are sent as JSON in the request body. Every payload includes information about the repository and the user who triggered the event.

Example: push event

Security

If a secret is configured, JJHub signs every delivery with an HMAC-SHA256 signature. The signature is sent in the X-JJHub-Signature-256 header.

Verifying Signatures

To verify a signature, compute the HMAC-SHA256 of the request body using your webhook secret as the key. The result should match the value in the header (prefixed with sha256=).

Delivery Headers

JJHub includes several headers in every delivery to help you identify and process the event:

Retries

If your server responds with a non-2xx status code, JJHub will attempt to redeliver the payload up to 5 times with exponential backoff. If a webhook fails consistently for several days, it may be automatically disabled. You will receive an email notification if this happens.