This page is a stub. Full API reference will be auto-generated from the OpenAPI spec. Coming soon.
Webhooks API
JJHub can deliver HTTP POST requests to your URL when events happen in a repository.
Webhook Events
| Event | Description |
|---|
push | Commits pushed to a bookmark |
landing_request.opened | Landing request created |
landing_request.closed | Landing request closed |
landing_request.landed | Changes landed to target bookmark |
issue.opened | Issue created |
issue.closed | Issue closed |
workflow.started | Workflow run started |
workflow.completed | Workflow run completed |
Create Webhook
POST /api/repos/{owner}/{repo}/hooks
Request:
{
"url": "https://your-server.example.com/webhook",
"content_type": "json",
"secret": "your-webhook-secret",
"events": ["push", "landing_request"],
"active": true
}
HMAC-SHA256 Signature
Every webhook delivery includes an X-JJHub-Signature-256 header:
X-JJHub-Signature-256: sha256=abc123...
Verify with:
import { createHmac } from "crypto";
function verifySignature(payload: string, secret: string, signature: string): boolean {
const expected = "sha256=" + createHmac("sha256", secret).update(payload).digest("hex");
return expected === signature;
}
Delivery Retries
Failed deliveries are retried with exponential backoff (5s, 25s, 125s, 625s, 3125s).