BranchManager can easily lock and unlock branches in your Github repository.
Usage: branch-manager COMMAND Options: -V, --version output the version number -h, --help output usage information Commands: lock Lock branches unlock Unlock branches help [cmd] display help for [cmd] Usage: branch-manager-lock [options] Options: -r, --repository <repository> Full name of the repository -b, --branch <branch-regex> Regular expression -g, --github-api [url] Default is 'https://api.github.com' -t, --token [token] Github API token. Uses contents of .bmtoken by default --ca-file [ca-file-path] Path to CA file -m, --dry-run See what branches would be affected -v, --verbose Show verbose output --debug Show debug output -h, --help output usage informati Usage: branch-manager-unlock [options] Options: -r, --repository <repository> Full name of the repository -b, --branch <branch-regex> Regular expression -g, --github-api [url] Default is 'https://api.github.com' -t, --token [token] Github API token. Uses contents of .bmtoken by default --ca-file [ca-file-path] Path to CA file -m, --dry-run See what branches would be affected -v, --verbose Show verbose output --debug Show debug output -h, --help output usage information Set global settings in a bmconfig.json. Settings from ./bmconfig.json will be merged with global settings in ~/bmconfig.json with local settings taking priority.
{ "branchProtectionOptions": <branch protection object>, "caFilePath": "<path to CA file>", "token": "GITHUB_PERSONAL_ACCESS_TOKEN" } Check the Github API documentation for more information on how to format the branchProtectionOptions.
