The tool lets you automate the addition, removal or alteration of the branch protection rules for 1 or more branches & repositories in one go. This helps users to bulk update the branch rules which saves lot of time when you have hundreds of branches and repositories in your organization.
The tool currently supports adding or modifying the below branch protection rules-
- Require pull request reviews before merging
- Dismiss stale pull request approvals when new commits are pushed
- Require review from Code Owners
- Restrict who can dismiss pull request reviews
- Require status checks to pass before merging
- Require branches to be up to date before merging
- Require signed commits
- Include administrators
- Restrict who can push to matching branches
- Add or update CODEOWNERS
You can run the tool as Docker Container or cli using Python. Refer to the below sections in both cases.
- A GitHub organization with permissions to update the branch protection rules
- Git installed on your machine.Click here to get the latest version of Git.
- Docker installed on your machine
-
Python 3.8 or above installed on your machine
-
Install the latest version of pip
python -m pip install --upgrade pip
-
Install the Python library stdiomask
pip install stdiomask
-
Install the Python library PyGithub
pip install pygithub
Note
To learn how to setup and use the tool click here.
- The tool does not support for Personal user accounts
- Allow force pushes, Allow deletions and Require linear history rules are not supported
You can try the web app from here.
The scripts and documentation in this project are released under the MIT License