Created
March 30, 2026 17:57
-
-
Save woodruffw/643a6cf70ad72d404ce6f9f333181cf8 to your computer and use it in GitHub Desktop.
Example rulesets used by Astral
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "no-push-advisory-branches", | |
| "target": "branch", | |
| "enforcement": "active", | |
| "conditions": { | |
| "repository_name": { | |
| "include": [ | |
| "ruff", | |
| "ty", | |
| "uv" | |
| ], | |
| "exclude": [] | |
| }, | |
| "ref_name": { | |
| "exclude": [], | |
| "include": [ | |
| "refs/heads/advisory-*", | |
| "refs/heads/ghsa-*", | |
| "refs/heads/cve-*" | |
| ] | |
| } | |
| }, | |
| "rules": [ | |
| { | |
| "type": "non_fast_forward" | |
| }, | |
| { | |
| "type": "creation" | |
| }, | |
| { | |
| "type": "update" | |
| } | |
| ], | |
| "bypass_actors": [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "no-push-internal-branches", | |
| "target": "branch", | |
| "enforcement": "active", | |
| "conditions": { | |
| "repository_name": { | |
| "include": [ | |
| "ruff", | |
| "ty", | |
| "uv" | |
| ], | |
| "exclude": [] | |
| }, | |
| "ref_name": { | |
| "exclude": [], | |
| "include": [ | |
| "refs/heads/internal/**/*" | |
| ] | |
| } | |
| }, | |
| "rules": [ | |
| { | |
| "type": "non_fast_forward" | |
| }, | |
| { | |
| "type": "creation" | |
| }, | |
| { | |
| "type": "update" | |
| } | |
| ], | |
| "bypass_actors": [] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "branches-main", | |
| "target": "branch", | |
| "enforcement": "active", | |
| "conditions": { | |
| "repository_name": { | |
| "include": [ | |
| "ruff", | |
| "ty", | |
| "uv" | |
| ], | |
| "exclude": [] | |
| }, | |
| "ref_name": { | |
| "exclude": [], | |
| "include": [ | |
| "~DEFAULT_BRANCH" | |
| ] | |
| } | |
| }, | |
| "rules": [ | |
| { | |
| "type": "deletion" | |
| }, | |
| { | |
| "type": "non_fast_forward" | |
| }, | |
| { | |
| "type": "required_linear_history" | |
| }, | |
| { | |
| "type": "pull_request", | |
| "parameters": { | |
| "required_approving_review_count": 0, | |
| "dismiss_stale_reviews_on_push": false, | |
| "required_reviewers": [], | |
| "require_code_owner_review": false, | |
| "require_last_push_approval": false, | |
| "required_review_thread_resolution": false, | |
| "allowed_merge_methods": [ | |
| "squash", | |
| "rebase" | |
| ] | |
| } | |
| } | |
| ], | |
| "bypass_actors": [] | |
| } |
Comments are disabled for this gist.