Skip to content

Instantly share code, notes, and snippets.

@jonchurch
Created January 20, 2026 17:34
Show Gist options
  • Select an option

  • Save jonchurch/0f71e626302ce9325eae3e20f6fae705 to your computer and use it in GitHub Desktop.

Select an option

Save jonchurch/0f71e626302ce9325eae3e20f6fae705 to your computer and use it in GitHub Desktop.
Branch protection ruleset template
{
"id": 8040275,
"name": "Default branch protection",
"target": "branch",
"source_type": "Organization",
"source": "expressjs",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"~DEFAULT_BRANCH"
]
},
"repository_property": {
"exclude": [],
"include": []
}
},
"rules": [
{
"type": "deletion"
},
{
"type": "non_fast_forward"
},
{
"type": "required_linear_history"
},
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": false,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_review_thread_resolution": false,
"automatic_copilot_code_review_enabled": false,
"allowed_merge_methods": [
"squash",
"rebase"
]
}
}
],
"bypass_actors": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment