> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prvue.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub webhook

> Receives GitHub pull_request webhook events (opened, reopened, synchronize, closed). Requires X-Hub-Signature-256 header. Payload follows GitHub webhook payload format.



## OpenAPI

````yaml openapi.json post /webhook/github
openapi: 3.0.3
info:
  title: Prvue Orchestrator API
  version: 0.1.0
  description: >-
    API for the preview deployer orchestrator: health checks, GitHub webhook,
    and preview lifecycle (list/delete).
servers:
  - url: http://localhost:3000
    description: Orchestrator API (on server; default ORCHESTRATOR_PORT)
security: []
paths:
  /webhook/github:
    post:
      tags:
        - Webhook
      summary: GitHub webhook
      description: >-
        Receives GitHub pull_request webhook events (opened, reopened,
        synchronize, closed). Requires X-Hub-Signature-256 header. Payload
        follows GitHub webhook payload format.
      operationId: postWebhookGitHub
      parameters:
        - name: x-hub-signature-256
          in: header
          required: true
          description: HMAC-SHA256 signature of the request body using the webhook secret.
          schema:
            type: string
            example: sha256=...
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitHubWebhookPayload'
      responses:
        '200':
          description: Webhook processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
        '401':
          description: Invalid signature
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Webhook handling failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GitHubWebhookPayload:
      type: object
      description: >-
        GitHub pull_request webhook payload. See
        https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request
      required:
        - action
        - pull_request
        - repository
      properties:
        action:
          type: string
          enum:
            - opened
            - reopened
            - synchronize
            - closed
        pull_request:
          type: object
          required:
            - number
            - head
            - base
          properties:
            number:
              type: integer
            head:
              type: object
              properties:
                ref:
                  type: string
                sha:
                  type: string
                repo:
                  type: object
                  properties:
                    clone_url:
                      type: string
                    name:
                      type: string
                    owner:
                      type: object
                      properties:
                        login:
                          type: string
            base:
              type: object
              properties:
                ref:
                  type: string
        repository:
          type: object
          required:
            - full_name
            - name
            - owner
          properties:
            full_name:
              type: string
            name:
              type: string
            owner:
              type: object
              properties:
                login:
                  type: string
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message

````