Example rulesets used by Astral Based on the provided text, the article summarizes example rulesets used by Astral for repositories like "ruff," "ty," and "uv." These rulesets enforce branch protections, such as preventing pushes to advisory and internal branches, requiring pull requests on the default branch, and making tags immutable. Additionally, the rulesets include conditions for specific ref names and repository names to apply these protections. branches-disallow-advisory.json 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 Show hidden 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": } branches-disallow-internal.json 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 Show hidden 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": } branches-main.json 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 Show hidden 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": } tags-are-immutable.json 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 Show hidden characters { "name": "tags-are-immutable", "target": "tag", "enforcement": "active", "conditions": { "repository name": { "include": "ruff", "ty", "uv" , "exclude": }, "ref name": { "exclude": , "include": "~ALL" } }, "rules": { "type": "deletion" }, { "type": "non fast forward" }, { "type": "update" } , "bypass actors": } tags-require-release.json 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 Show hidden characters { "name": "tag-requires-release", "target": "tag", "enforcement": "active", "conditions": { "repository name": { "include": "uv" , "exclude": }, "ref name": { "exclude": , "include": "~ALL" } }, "rules": { "type": "non fast forward" }, { "type": "required deployments", "parameters": { "required deployment environments": "release" } } , "bypass actors": }