Getting started with Rulesets is straightforward and can be done in a few simple steps.

GitHub App Installation

The easiest way to use Rulesets is through the GitHub Marketplace:
1

Visit GitHub Marketplace

Go to the Rulesets GitHub App in the GitHub Marketplace
2

Install the App

Click “Install it for free”
3

Choose Repository Access

Select which repositories Rulesets should have access to:
  • All repositories
  • Only select repositories
4

Confirm Installation

Review the permissions and confirm the installation

Configuration Setup

After installing the GitHub App, you need to create a configuration file in your repository:
1

Create Configuration File

Create a new file at .github/Ruleset.yml in your repository
2

Define Your Ruleset

Add your ruleset configuration (see Quickstart for examples)
3

Commit and Push

Commit the configuration file and push it to your repository

Self-Hosting (Optional)

If you prefer to self-host Rulesets:
# Clone the repository
git clone https://github.com/wizenheimer/rulesets.git
cd rulesets

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your GitHub App credentials

# Build and start the server
npm run build
npm start

Required Permissions

Rulesets requires the following GitHub permissions:
PermissionAccess LevelPurpose
ChecksRead & WriteCreate check runs
ContentsRead & WriteAccess repository files
IssuesRead & WriteAdd comments and labels
Pull RequestsRead & WriteManage pull requests
MetadataReadAccess repository metadata
StatusesRead & WriteUpdate commit statuses
MembersReadCheck team membership

Verification

To verify your installation is working correctly:
  1. Create a test pull request
  2. Check if Rulesets is applying your rules as expected
  3. Review any comments or actions performed by the app

Troubleshooting

If you encounter issues:
For more help, check the GitHub Issues or submit a new issue.