Skip to main content
Webhook event documentation and GitHub Apps endpoint documentation are both auto-generated from the OpenAPI stored in github/rest-api-description. They share the same sync-openapi.yml workflow as the REST pipeline, but write output to separate directories. Several other documentation types — audit logs, secret scanning, and CodeQL CLI — have their own independent sync scripts.

The shared OpenAPI pipeline

The .github/workflows/sync-openapi.yml workflow triggers three pipelines in a single run:

REST

Writes Markdown to content/rest/ and data to src/rest/data/

Webhooks

Writes data to src/webhooks/data/

GitHub Apps

Writes data to src/github-apps/data/
All three pipelines are triggered by npm run sync-rest. For webhooks and GitHub Apps, the script writes to different output directories using the -o flag. Automated PRs carry the github-openapi-bot label.

Webhooks pipeline

The webhooks pipeline generates documentation for docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads.

Directory structure

The content file content/webhooks-and-events/webhooks/webhook-events-and-payloads can have manually authored frontmatter and an introductory paragraph. Automated content is appended after that.

Running locally

Or use the dedicated script alias:

GitHub Apps pipeline

The GitHub Apps pipeline generates the endpoint permission tables for:
  • Endpoints available for GitHub App installation access tokens
  • Endpoints available for GitHub App user access tokens
  • Endpoints available for fine-grained personal access tokens
  • Permissions required for GitHub Apps
  • Permissions required for fine-grained personal access tokens

Directory structure

Running locally

Content team guidance

Writers can update frontmatter and add an introduction paragraph in the associated Markdown file above the auto-generation comment:
The versions frontmatter property is overwritten on every pipeline run.

Other automated documentation pipelines

Several other doc types are generated by independent sync scripts with their own workflows.
Workflow: .github/workflows/sync-audit-logs.ymlScript: src/audit-logs/scripts/sync.tsGenerates audit log event documentation. Run manually with:
Workflow: .github/workflows/sync-secret-scanning.ymlScript: src/secret-scanning/scripts/sync.tsGenerates the list of supported secret scanning patterns. Run manually with:
Workflow: .github/workflows/sync-codeql-cli.ymlScript: src/codeql-cli/scripts/sync.tsGenerates CodeQL CLI reference documentation. Run manually with:
Workflow: .github/workflows/sync-graphql.ymlScript: src/graphql/scripts/sync.tsFetches the GraphQL schema from GitHub’s API. See GraphQL docs for details.

SHA tracking

Each OpenAPI-driven pipeline stores the SHA of the github/rest-api-description commit it last synced from. This is recorded in the sha field of each pipeline’s config.json:
  • src/webhooks/lib/config.json
  • src/github-apps/lib/config.json
  • src/rest/lib/config.json
This value is updated automatically when the pipeline runs and gives you a precise reference for the source of every generated file.

Escalation paths

Known limitations

  • Shared pipeline — Webhooks and GitHub Apps cannot be synced independently of each other or of REST. All three run together.
  • Single webhook page — All webhook events render on a single page, which can affect performance for large payloads.
  • Introduction placement — Writer-authored introductions must appear before automated content in the source Markdown file.