@cirocfc/yet-another-github-branch-protection-tool
v0.0.1-alpha.6
Published
Just a simple helper to protect branches using restrictions
Downloads
2
Readme
yet-another-github-branch-protection-tool
Just a simple helper to protect Github branches using Octokit and restrictions.
Installation
yarn add @cirocfc/yet-another-github-branch-protection-tool
Create a config
directory and place in it both your defaults.yaml
and projects.yaml
configuration.
Usage
In order to use this package, you must provide a GITHUB_TOKEN environment variable with a Personal access tokens. If you don't have one, go ahead and create it.
After setting the GITHUB_TOKEN value, you can run the commands:
To lock a branch:
yarn ya-protect-branch --project=<project-name-from-projects.yaml> --locked
To unlock a branch:
yarn ya-protect-branch --project=<project-name-from-projects.yaml>
That's it. Enjoy!