0.0.1-alpha.6 • Published 5 years ago

@cirocfc/yet-another-github-branch-protection-tool v0.0.1-alpha.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

npm Commitizen friendly

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!