Example Categories
Getting Started
Basic Setup
Complete starter configuration for a new organization with sensible defaults
Core Features
Branch Protection
Examples of branch protection rules with different security requirements
Team Management
Team permissions with include/exclude patterns for flexible access control
Advanced Patterns
Multi-Level Config
How org, suborg, and repo configurations merge together
Custom Validation
Real examples of configvalidators and overridevalidators
Understanding the Configuration Hierarchy
Safe Settings uses a three-level configuration hierarchy: Precedence: Repository > Sub-Organization > Organization Settings at lower levels override settings at higher levels, allowing you to:- Set organization-wide defaults
- Customize settings for groups of repositories (suborgs)
- Override specific settings for individual repositories
Common Use Cases
Enforce Security Standards
Set minimum security requirements at the org level (required approvals, status checks) while allowing teams to add stricter controls.Manage Team Permissions
Define team access patterns that automatically apply to repositories based on naming conventions or team membership.Prevent Configuration Drift
Ensure repository settings stay consistent with policy, even if someone manually changes them through the GitHub UI.Scale Policy Management
Manage thousands of repositories with a small set of configuration files instead of manually configuring each one.File Structure Example
Next Steps
Start with Basic Setup
Begin with the Basic Setup example to create your first organization-wide configuration.
Add Branch Protection
Secure your codebase with Branch Protection rules.
Configure Team Access
Set up Team Management with pattern-based access control.
Scale with Multi-Level Configs
Learn Multi-Level Configuration for complex organizations.
Add Custom Validation
Implement Custom Validation rules for your specific policies.
Tips for Success
Start Simple
Start Simple
Begin with org-level settings and only add suborg/repo overrides when needed.
Use CODEOWNERS
Use CODEOWNERS
Set up CODEOWNERS in your admin repo so different teams can manage their suborg configs.
Test in Dry-Run
Test in Dry-Run
Always test changes in a pull request first - Safe Settings will validate in dry-run mode.
Monitor Check Runs
Monitor Check Runs
Watch the safe-settings check runs to see what changes are being applied.