Nightwatch
Laravel Nightwatch issue webhooks, verified with Nightwatch-Signature.
Set it up
- In Nightwatch, open the application's Issues settings → Webhooks and add a webhook. URL: the source's hook URL. Nightwatch allows one webhook per application.
- Nightwatch shows the signing secret (Issues settings → Webhooks → Edit). Pass it when you add the source:
briefkasten source add nightwatch --project acme-shop --secret <signing secret>Signature
Nightwatch signs the raw body with HMAC-SHA256, lowercase hex, in Nightwatch-Signature. The signed body carries timestamp; a delivery more than five minutes from now is refused, so a captured one can't be replayed later.
Events
Nightwatch sends issue.opened, issue.reopened, issue.ignored and issue.resolved. Each becomes one error event; its body says which:
| Field | |
|---|---|
action | opened, reopened, ignored or resolved |
application, ref | the application's id and the issue's number in it |
issue | the issue's id |
title, type, status, priority, url | as Nightwatch sent them |
environment, actor | the environment of a reopened issue, the person who acted |
at | when Nightwatch sent it |
The target is <application id>.<ref>. The samples below are the deliveries Nightwatch posts.
issue.openedA new issue was opened in productionevent errortarget 0b9a3c1e-1111-4222-8333-944455556666.42
{
"event": "issue.opened",
"timestamp": "2026-12-04T12:00:00.000Z",
"payload": {
"webhook_id": "5e6f7a8b-0000-4000-8000-000000000001",
"application_id": "0b9a3c1e-1111-4222-8333-944455556666",
"organization_id": "5e6f7a8b-0000-4000-8000-000000000002",
"issue": {
"id": "7c1d2e3f-aaaa-4bbb-8ccc-0d1e2f3a4b5c",
"ref": 42,
"type": "exception",
"title": "RuntimeException: The invoice could not be rendered",
"priority": "high",
"url": "https://nightwatch.laravel.com/eu/applications/0b9a3c1e-1111-4222-8333-944455556666/issues/42",
"status": "open"
},
"environment": {
"id": "env-1",
"name": "production"
}
}
}issue.resolvedSomebody resolved an issueevent errortarget 0b9a3c1e-1111-4222-8333-944455556666.42
{
"event": "issue.resolved",
"timestamp": "2026-12-04T12:00:00.000Z",
"payload": {
"webhook_id": "5e6f7a8b-0000-4000-8000-000000000001",
"application_id": "0b9a3c1e-1111-4222-8333-944455556666",
"organization_id": "5e6f7a8b-0000-4000-8000-000000000002",
"issue": {
"id": "7c1d2e3f-aaaa-4bbb-8ccc-0d1e2f3a4b5c",
"ref": 42,
"type": "exception",
"title": "RuntimeException: The invoice could not be rendered",
"priority": "high",
"url": "https://nightwatch.laravel.com/eu/applications/0b9a3c1e-1111-4222-8333-944455556666/issues/42",
"status": "resolved"
},
"actor": {
"id": "u-1",
"name": "Ada Example",
"email": "ada@example.com",
"type": "user"
}
}
}Options
None.
In your app
import { nightwatch } from "@briefkasten/adapter-nightwatch";
const hooks = briefkasten({
sources: { nightwatch: nightwatch({ secret: process.env.NIGHTWATCH_WEBHOOK_SECRET }) },
});
hooks.on("nightwatch:error", async (event) => {
console.log(event.body.action, event.body.title);
});