A small Node app for automating common tasks for managing Which?'s Github repos.
- Clone the repo and run
yarn
. - Create a .env file containing your Github username and access token. Access tokens can be generated here. NB: User must have permissions to create repos within the whichdigital Github org.
- Run
node index.js
passing in the command and arguments as detailed below.
Creates a new repository with the given name. Creates a master and develop branch. Sets develop as the default branch. Adds protection to both master and develop branches.
Argument | Required | Default |
---|---|---|
Repo name | Y | n/a |
Creates a new repository with the given name.
Argument | Required | Default |
---|---|---|
Repo name | Y | n/a |
Creates a new branch off the master branch.
Argument | Required | Default |
---|---|---|
Repo name | Y | n/a |
Branch name | Y | n/a |
Sets the default branch to the specified branch.
Argument | Required | Default |
---|---|---|
Repo name | Y | n/a |
Default Branch name | N | develop |
Adds branch protection to the specified branch.
Argument | Required | Default |
---|---|---|
Repo name | Y | n/a |
Branch name | Y | n/a |