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 repository2
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:Required Permissions
Rulesets requires the following GitHub permissions:Permission | Access Level | Purpose |
---|---|---|
Checks | Read & Write | Create check runs |
Contents | Read & Write | Access repository files |
Issues | Read & Write | Add comments and labels |
Pull Requests | Read & Write | Manage pull requests |
Metadata | Read | Access repository metadata |
Statuses | Read & Write | Update commit statuses |
Members | Read | Check team membership |
Verification
To verify your installation is working correctly:- Create a test pull request
- Check if Rulesets is applying your rules as expected
- Review any comments or actions performed by the app
Troubleshooting
If you encounter issues:Configuration Not Working
Configuration Not Working
- Ensure your
.github/Ruleset.yml
file is valid YAML - Check that the indentation is correct
- Verify the file is in the correct location
Missing Permissions
Missing Permissions
- Confirm the GitHub App has all required permissions
- Re-install the app if needed to grant missing permissions
Events Not Triggering
Events Not Triggering
- Check that you’ve subscribed to the right events in your rules
- Verify that the GitHub App is receiving webhooks