branch is a small CLI tool to automatically create git branches based on JIRA issues.
To install the command line tool, change to the directory of the folder and run the following command:
go install command places the executable into the $GOPATH/bin directory. The command will place generated executables into a sub-directory of $GOPATH named bin. So please make sure that this directory is in your
$PATH environment variable.
To use the tool you first have to authenticate with Jira. You need the following to successfully setup the tool:
- Domain of your Jira
- API Token (Learn more here)
Once you have gathered these inputs, you can run the following command:
branch login [email protected] -d=test -t=yourtoken
To create a branch based on a Jira issue you can run the following command:
branch n -i=key
i argument corresponds to the issue key. Please not that your working tree must be clean for the command to succeed, untracked files are ignored at the moment!