https://github.com/github/ruleset-recipes
Quickstart your use of Repository Rules with prebuilt rulesets ready to import.
https://github.com/github/ruleset-recipes
Last synced: 10 months ago
JSON representation
Quickstart your use of Repository Rules with prebuilt rulesets ready to import.
- Host: GitHub
- URL: https://github.com/github/ruleset-recipes
- Owner: github
- License: mit
- Created: 2023-08-18T21:17:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-12T18:06:43.000Z (about 1 year ago)
- Last Synced: 2025-04-03T14:09:00.151Z (11 months ago)
- Size: 41 KB
- Stars: 261
- Watchers: 12
- Forks: 62
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
# Ruleset recipes
Starter rulesets are pre-baked to make it easy to get started with [repository rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets).
## What is a ruleset?
A ruleset is a named list of rules that applies to a repository. You can create rulesets to control how people interact with selected branches and tags in a repository. You can control things like who can push commits to a particular branch or who can delete or rename a tag. For example, you could set up a ruleset for your repository's feature branch that requires signed commits and blocks force pushes for all users except repository administrators.
## Get cooking
1. Grab a copy of this repo
- ⬆️ top click `< > Code`
- Pick your favorite way to clone, like [GitHub CLI](https://cli.github.com/), or download the ZIP.
2. To get started, visit your favorite repository or organization you have admin access to.
- Head to ⚙️Settings > Rules > Rulesets
- Select New Ruleset > Import a ruleset
- Browse to your local clone of the ruleset-recipes you want to import
- Review the imported ruleset and save your changes!
- Success! 🎉
### Video Example

# Table of contents
## Branch Rulesets
- [Branch protection best practices](https://github.com/github/ruleset-recipes/blob/a1f8e53ec12857637e8762e689a3abc255ff2c2f/branch-rulesets/were-just-normal-repositories.json)
- [Require Pull Requests and conventional commits](https://github.com/github/ruleset-recipes/blob/8cd19a8e06e6e523fffd43e4a59a554c210dcbe2/branch-rulesets/PRs%20and%20commits.json)
- [Organization ruleset: One Rule to rule them all](https://github.com/github/ruleset-recipes/blob/8cd19a8e06e6e523fffd43e4a59a554c210dcbe2/branch-rulesets/org-rulesets/one-ruleset-to-rule-them-all.json)
## Tag Rulesets
- [Prevent Tag Deletions](https://github.com/github/ruleset-recipes/blob/a1f8e53ec12857637e8762e689a3abc255ff2c2f/tag-rulesets/prevent-tag-delete.json)
- [Organization ruleset: requiring semantic versioning and prevents deletion for all tags](https://github.com/github/ruleset-recipes/blob/ac4b5ebc05219bb07de10f6094ad9ae8215bd39c/tag-rulesets/org-ruleset/tag-defaults.json)