cd /news/developer-tools/example-rulesets-used-by-astral · home topics developer-tools article
[ARTICLE · art-8356] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

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.

read2 min views22 publishedMar 30, 2026
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": []

}
── more in #developer-tools 4 stories · sorted by recency
── more on @astral 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/example-rulesets-use…] indexed:0 read:2min 2026-03-30 ·