Configuration
GitHub Webhook Server uses a flexible YAML-based configuration system with support for global settings, repository-specific overrides, and environment variables. Configuration changes take effect immediately without server restart.Configuration Files
Global Configuration
The main configuration file isconfig.yaml in your data directory (default: /home/podman/data/config.yaml).
config.yaml
The
yaml-language-server comment enables IDE autocompletion and validation. Keep it at the top of your config file.Repository-Level Overrides
Create.github-webhook-server.yaml in your repository root to override or extend global configuration:
.github-webhook-server.yaml
- Version-controlled configuration alongside your code
- Per-project customization without modifying global config
- Zero-downtime updates to repository settings
- Repository maintainers can manage their own automation
Environment Variables
Environment variables control server behavior and override config file settings.Core Settings
| Variable | Description | Default | Required |
|---|---|---|---|
WEBHOOK_SERVER_DATA_DIR | Directory containing config.yaml | /home/podman/data | Yes |
WEBHOOK_SERVER_IP_BIND | IP address to bind server | 0.0.0.0 | No |
WEBHOOK_SERVER_PORT | Port to bind server | 5000 | No |
MAX_WORKERS | Maximum number of workers | 10 | No |
Security Settings
| Variable | Description | Default | Required |
|---|---|---|---|
WEBHOOK_SECRET | GitHub webhook secret for HMAC verification | - | Recommended |
VERIFY_GITHUB_IPS | Verify requests from GitHub IP ranges | false | No |
VERIFY_CLOUDFLARE_IPS | Verify requests from Cloudflare IPs | false | No |
Feature Toggles
| Variable | Description | Default | Required |
|---|---|---|---|
ENABLE_LOG_SERVER | Enable log viewer web interface | false | No |
ENABLE_MCP_SERVER | Enable MCP server for AI agents | false | No |
AI CLI API Keys
For AI-powered features like test-oracle and conventional title suggestions:| Variable | Description | Provider |
|---|---|---|
ANTHROPIC_API_KEY | API key for Claude Code CLI | Claude |
GEMINI_API_KEY | API key for Gemini CLI | Gemini |
CURSOR_API_KEY | API key for Cursor Agent CLI | Cursor |
Minimal Configuration
The smallest working configuration requires only three fields:config.yaml
- Basic webhook processing
- Pull request labeling
- Branch protection
Advanced Configuration
Server Configuration
config.yaml
Global Defaults
config.yaml
Docker Registry Configuration
For pulling private base images:config.yaml
Branch Protection
Global branch protection rules applied to all repositories:config.yaml
Repository Configuration
Basic Repository Setup
config.yaml
Pull Request Settings
config.yaml
CI/CD Configuration
Tox Testing Integration
Tox Testing Integration
config.yaml
- Triggered on pull request creation and updates
- Runs tox environments based on target branch
- Results reported as GitHub check runs
Container Building and Publishing
Container Building and Publishing
config.yaml
PyPI Publishing
PyPI Publishing
config.yaml
- Automatically publishes to PyPI on new releases
- Uses Poetry or setuptools for packaging
- Version extracted from release tag
Label Configuration
Enable/Disable Label Categories
Enable/Disable Label Categories
Control which automation labels are applied to pull requests:Available label categories:
config.yaml
| Category | Labels | Description |
|---|---|---|
verified | verified | Manual verification status |
hold | hold | Block PR merging |
wip | wip | Work in progress |
needs-rebase | needs-rebase | PR needs rebasing |
has-conflicts | has-conflicts | Merge conflicts |
can-be-merged | can-be-merged | Meets all requirements |
size | size/XS, size/S, etc. | PR size labels |
branch | branch/<name> | Target branch |
cherry-pick | cherry-pick/<branch> | Cherry-pick tracking |
automerge | automerge | Auto-merge enabled |
Reviewed-by labels (
approved-*, lgtm-*, changes-requested-*, commented-*) are always enabled and cannot be disabled.Custom PR Size Labels
Custom PR Size Labels
Define custom size labels with your own thresholds and colors:Rules:
config.yaml
threshold: Positive integer orinffor unboundedcolor: CSS3 color name (red, green, lightgray, etc.)- Size = additions + deletions
- Use
inffor largest category to catch all remaining PRs
AI Features
PR Test Oracle Integration
PR Test Oracle Integration
AI-powered test recommendations based on PR diff analysis:Trigger manually:See pr-test-oracle for server setup.
config.yaml
AI Conventional Title Suggestions
AI Conventional Title Suggestions
AI-powered PR title suggestions following Conventional Commits:Modes:
config.yaml
"true": Show AI suggestion in check run output when validation fails"false": Disabled (default)"fix": Automatically update PR title with validated AI suggestion
Commands on Draft PRs
config.yaml
- If not set: Commands blocked on draft PRs (default)
- If empty array
[]: All commands allowed - If array with values: Only listed commands allowed
Configuration Validation
Schema Validation
Validate your configuration file before deploying:Real-time Validation
IDEs with YAML Language Server support provide real-time validation:-
Ensure the schema comment is at the top of your config:
-
Install YAML extension in your IDE:
- VS Code: YAML by Red Hat
- IntelliJ: Built-in YAML support
- Vim/Neovim: yaml-language-server
- Get autocompletion and validation as you type
Example Configurations
Theexamples/ directory contains comprehensive configuration examples:
| File | Description |
|---|---|
config.yaml | Complete configuration with all available options |
docker-compose.yaml | Docker Compose deployment configuration |
.github-webhook-server.yaml | Repository-specific configuration template |
Next Steps
OWNERS Files
Configure OWNERS files for intelligent reviewer assignment
User Commands
Learn all available commands for PR management
Security
Configure security settings for production deployments
Monitoring
Set up monitoring and log analysis
Troubleshooting
Configuration Not Loading
Schema Validation Fails
Repository-Level Overrides Not Working
- Ensure
.github-webhook-server.yamlis in repository root - Check file permissions (must be readable)
- Validate YAML syntax
- Check server logs for parsing errors
- Verify repository name matches config
Configuration changes take effect immediately without server restart. The webhook server reloads configuration for each incoming webhook event.