github-webhook-server
FastAPI webhook server for automating GitHub repository settings, pull request workflows, checks, releases, and log analysis.
Get StartedOverview
-
Introduction
Explain what the server is, who it is for, and the main automation it performs across repositories and pull requests.
-
Architecture and Event Flow
Describe the webhook intake pipeline, background processing model, handler architecture, repository cloning and worktree usage, and structured logging flow.
Getting Started
-
Installation
Cover runtime requirements, Python and uv setup, required system tools, GitHub credentials, and the expected data directory contents.
-
Quick Start
Walk through creating a minimal config, adding a repository entry, providing the GitHub App private key, starting the server, and verifying the health endpoint.
-
Docker and Container Deployment
Document the Podman-based container image, the example docker-compose deployment, volume mounts, health checks, and operational caveats.
Configuration
-
Configuration Model
Explain configuration sources and precedence between global config.yaml, per-repository entries, and repository-local .github-webhook-server.yaml files.
-
Configuration Reference
Provide a key-by-key reference for global and repository settings such as events, tokens, labels, checks, branch protection, notifications, and release options.
-
Repository Overrides
Show how repository-local configuration customizes behavior per repo, including labels, checks, tokens, protected branches, and release settings.
-
Security Configuration
Document webhook secret validation, GitHub and Cloudflare IP allowlists, sensitive-data masking, and network restrictions for optional admin endpoints.
Guides
-
Supported GitHub Events
List the webhook events the server handles, what each event triggers, and which events or cases are intentionally skipped.
-
OWNERS and Reviewer Assignment
Explain how OWNERS files are discovered, how approvers and reviewers are derived from changed files, and how that affects review requests and command permissions.
-
Pull Request Automation
Describe welcome comments, tracking issues, WIP and hold behavior, auto-verification, assignee updates, auto-merge setup, and cherry-pick workflows.
-
Issue Comment Commands
Provide a command reference for /retest, /reprocess, /assign-reviewers, /assign-reviewer, /check-can-merge, /build-and-push-container, /test-oracle, label toggles, and related permissions.
-
Labels, Check Runs, and Mergeability
Explain built-in labels, reviewed-by labels, size and branch labels, verified and can-be-merged checks, minimum LGTM rules, unresolved conversation checks, and custom check runs.
-
Container and PyPI Workflows
Document container build and push behavior, tag-based release publishing, registry configuration, PyPI publishing, and Slack notifications.
-
AI Features and Test Oracle
Cover conventional-title validation, AI suggestion and auto-fix modes, supported AI providers, and the external PR test oracle integration and triggers.
-
Log Viewer Guide
Explain how to enable the log viewer, use filters and live streaming, inspect PR flows and workflow steps, and export logs safely.
API Reference
-
Webhook and Health API
Reference the main POST /webhook_server endpoint and GET /webhook_server/healthcheck endpoint, including validation rules and immediate-response semantics.
-
Log Viewer API
Reference the /logs API endpoints and WebSocket stream for historical queries, exports, PR flow inspection, workflow steps, and step-scoped logs.
-
MCP API
Document the optional /mcp endpoint, how it exposes the FastAPI surface to AI agents, and the deployment and security expectations around it.
Operations
-
Repository Bootstrap and GitHub App
Describe the startup-time repository bootstrap process that configures labels, branch protection, check states, and webhooks using the configured GitHub App.
-
Logging and Data Files
Document the data directory layout, rotating text logs, structured JSONL webhook logs, log viewer files, and how masking and log separation work.
-
Testing and Maintenance
Explain the unit, integration, and end-to-end test strategy, coverage expectations, pre-commit tooling, release automation, dependency update automation, and repository maintenance bots.
-
Troubleshooting
Collect common setup and runtime problems such as missing config, repository lookup failures, Podman runtime issues, skipped draft PR commands, and observability tips.