Overview
The GitHub Webhook Server includes comprehensive configuration validation using JSON Schema to ensure your configuration files are correct before deployment. This prevents runtime errors and provides IDE autocompletion for faster configuration.Schema Validation System
Schema Location
The configuration schema is defined in:What Gets Validated
Required Fields
Required Fields
github-app-id- GitHub App IDwebhook-ip- Webhook URL with full pathgithub-tokens- At least one GitHub tokenrepositories- Repository configurations- Repository
name- Full repository name (org/repo)
Type Checking
Type Checking
- Strings:
log-level,log-file,webhook-secret - Integers:
github-app-id,port,max-workers,minimum-lgtm - Booleans:
verify-github-ips,pre-commit,verified-job - Arrays:
github-tokens,protected-branches,enabled-labels - Objects:
docker,pypi,container,tox,labels
Enum Validation
Enum Validation
- log-level:
INFO,DEBUG - ai-provider:
claude,gemini,cursor - conventional-title:
true,false,fix - Label categories:
verified,hold,wip,needs-rebase,has-conflicts,can-be-merged,size,branch,cherry-pick,automerge
Structural Validation
Structural Validation
- Repository configurations nested correctly
- PR size thresholds properly formatted
- Protected branch rules structure
- Test oracle configuration
- AI features configuration
- Container build arguments
Cross-Field Validation
Cross-Field Validation
- Label categories in
enabled-labelsmust be valid - Repository names must match pattern
org/repo - Webhook URL must be valid URI
- Color names for labels must be CSS3 colors
IDE Integration
Enabling Schema Validation in Your Editor
Add the schema reference to the first line of yourconfig.yaml:
config.yaml
Supported Editors
VS Code
- Install YAML extension by Red Hat
- Schema validation automatic
- Hover documentation
- Autocomplete
IntelliJ IDEA
- Built-in YAML support
- Schema validation automatic
- Quick documentation
- Code completion
Vim/Neovim
- Install
yaml-language-server - Configure with coc.nvim or LSP
- Schema validation via LSP
IDE Features with Schema
- Autocompletion
- Validation Errors
- Hover Documentation
- Enum Suggestions
Type to see available fields:
Validation Commands
Validate Configuration Files
Use the built-in validator script to check your configuration:Running Configuration Tests
Run the full test suite for configuration validation:Validation Features
Required Fields Validation
GitHub App ID for webhook authentication
Full webhook URL including path (e.g.,
https://your-domain.com/webhook_server)At least one GitHub Personal Access Token with admin permissions
Map of repository short names to configuration objects, each containing:
name(required): Full repository name inorg/repoformat- Other repository-level settings (optional)
Type Checking Examples
Enum Validation Examples
Label Categories Validation
The schema validatesenabled-labels against allowed categories:
Review labels (
approved-*, lgtm-*, changes-requested-*) are always enabled and cannot be disabled.Structural Validation
The schema enforces correct nesting and structure:Common Validation Errors
Error: Missing Required Field
Error: Invalid Type
Error: Invalid Enum Value
Error: Invalid Label Category
Error: Malformed YAML
Validation Best Practices
Validate Before Commit
Run
uv run webhook_server/tests/test_schema_validator.py config.yaml before committingPre-Commit Hook Integration
Validate configuration automatically before commits:.pre-commit-config.yaml
Configuration Reference
Root Level Options
ip-bind(string): IP address to bind server (default:0.0.0.0)port(integer): Port number (default:5000)max-workers(integer): Worker count (default:10)log-level(enum):INFOorDEBUGlog-file(string): Log file path
webhook-secret(string): HMAC signature secretverify-github-ips(boolean): IP allowlist validationverify-cloudflare-ips(boolean): Cloudflare IP validationdisable-ssl-warnings(boolean): Suppress SSL warnings
github-app-id(integer, required): GitHub App IDgithub-tokens(array, required): Personal access tokenswebhook-ip(string, required): Full webhook URL
Repository Level Options
name(string, required): Full repository name (org/repo)log-level(enum):INFOorDEBUGlog-file(string): Repository-specific log fileslack-webhook-url(string): Slack notifications
verified-job(boolean): Enable verified label automationpre-commit(boolean): Run pre-commit hookspypi(object): PyPI publishing configurationtox(object): Tox test configurationcontainer(object): Container build/push configuration
minimum-lgtm(integer): Required approvals countconventional-title(string): Conventional commit validationcan-be-merged-required-labels(array): Labels required to mergecreate-issue-for-new-pr(boolean): Auto-create tracking issues
enabled-labels(array): Label categories to enablecolors(object): Custom label colorspr-size-thresholds(object): PR size label configuration
Related Documentation
Configuration Guide
Complete configuration options and examples
Schema Reference
Full JSON Schema definition on GitHub
Examples
Example configuration files
Testing
Running tests and validation