When you install the Deployaar GitHub App on a repository, Deployaar registers a webhook URL with your GitHub App. Whenever GitHub sends an event — such as a pull request being opened or a new commit pushed to an open PR — GitHub delivers a signed HTTPDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/paramveer-cyber/Deployaar/llms.txt
Use this file to discover all available pages before exploring further.
POST to POST /api/github/webhook. Deployaar verifies the payload’s HMAC-SHA256 signature, deduplicates the delivery using the x-github-delivery GUID, and dispatches the event to the appropriate internal handler. Routable events are forwarded to Inngest to trigger the full automated PR review workflow.
Endpoint
express.raw({ type: 'application/json' }) so the raw request bytes are preserved exactly as GitHub sent them. This is required for signature verification — any middleware that parses the body before this route will corrupt the HMAC check.
Required Headers
| Header | Description |
|---|---|
x-hub-signature-256 | HMAC-SHA256 signature of the raw request body, prefixed with sha256=. Computed by GitHub using your GITHUB_WEBHOOK_SECRET. |
x-github-event | The GitHub event name (e.g. pull_request, issues). |
x-github-delivery | A unique UUID identifying this delivery. Deployaar stores this to prevent duplicate processing. |
Content-Type | Must be application/json. |
x-hub-signature-256, x-github-event, or x-github-delivery are absent, the request is rejected immediately with a 401.
Signature Verification
Deployaar callsapp.webhooks.verify(rawBody, signature) via the Octokit GitHub App SDK. Under the hood this computes:
x-hub-signature-256 header (after stripping the sha256= prefix). If the signatures do not match, a 401 {"error": "Invalid signature"} is returned immediately and no further processing occurs. The environment variable GITHUB_WEBHOOK_SECRET must exactly match the secret configured in your GitHub App settings.
Handled Events
Deployaar checks each delivery for idempotency before acting on it. Thex-github-delivery GUID is looked up in the github_webhook_deliveries table; duplicate deliveries are silently acknowledged without re-processing.
| Event | Actions | Behavior |
|---|---|---|
pull_request | opened, synchronize, reopened | Matched against a known project repository. If matched, sends the github/pull-request.received event to Inngest, which triggers the automated AI PR review workflow. |
issues | opened, edited | Matched against a known project repository. If matched, sends the github/issue.received event to Inngest. |
| Any other event | — | Acknowledged with 200 {"received": true}. No workflow is triggered. |
Deployaar silently ignores events for repositories that are not linked to any project. The
pull_request and issues events are cross-referenced against the project_repositories table using the repository.full_name field in the webhook payload. Unrecognised repos are dropped without an error response.pull_request event with a routable action is dispatched, the following data is extracted from the payload and forwarded to Inngest:
Response Codes
| Status | Body | Meaning |
|---|---|---|
200 | {"received": true} | Event received and processed (or acknowledged with no action). |
401 | {"error": "Missing required headers"} | One or more of x-hub-signature-256, x-github-event, or x-github-delivery are absent. |
401 | {"error": "Invalid signature"} | HMAC-SHA256 verification failed. The payload may have been tampered with, or GITHUB_WEBHOOK_SECRET is misconfigured. |
Errors that occur after successful signature verification (e.g. a transient database error during Inngest dispatch) are swallowed and still return
200 {"received": true}. This prevents GitHub from retrying deliveries for non-recoverable server-side failures.Setting Up
Deploy the Deployaar API
Ensure the Deployaar API is publicly accessible. The webhook endpoint must be reachable from GitHub’s servers. The deployed URL will look like
https://your-api.onrender.com (or your own domain).Set the Webhook URL in your GitHub App
In your GitHub App settings (Settings → Developer settings → GitHub Apps → your app → General), locate the Webhook section and set the Webhook URL to:
Configure the webhook secret
Generate a strong random secret (at least 32 characters). Paste it into the Webhook secret field in your GitHub App settings. Then set the same value as the
GITHUB_WEBHOOK_SECRET environment variable in your API deployment.Enable the required events
Under Permissions & events → Subscribe to events, enable at minimum:
- Pull requests — triggers the AI PR review workflow on
opened,synchronize, andreopenedactions. - Issues — triggers the issue intake workflow on
openedandeditedactions.
ping delivery to verify the URL is reachable.Local Testing
You can simulate a webhook delivery withcurl to confirm your local server is handling the signature check correctly. Replace <secret> with your GITHUB_WEBHOOK_SECRET and re-compute the signature each time you change the payload body:
200 {"received":true}. An incorrect secret or tampered body returns 401 {"error":"Invalid signature"}.