Git + JIRA Tools
-
Install the JIRA CLI
brew install go-jira
If you cannot install this via brew or is on another OS than MacOS. Look at the install instructions on https://github.com/go-jira/jira
-
You will need to add the following to your
~/.jira.d/config.yml
endpoint: https://companyname.atlassian.net/ user: user@example.com password-source: keyring
This turn on API token authentication and you will need to create one here:
-
Create the summary folder under
~/.jira.d/
mkdir -p ~/.jira.d/summary
-
Install git_show_jira_summary.sh
curl https://gist.githubusercontent.com/leoxlin/ac0bc7a7b4427365b9eb6334c1c43f73/raw/74e06c3dc5f564984eacc4b00a1bae84a4eb4d5f/git_show_jira_summary.sh > ~/.git_show_jira_summary.sh chmod +x ~/.git_show_jira_summary.sh
-
Add a new alias branch jira which requires a PROJECTKEY for the project you want to resolve summaries for
git config --global alias.branchjira "! git branch | ~/.git_show_jira_summary.sh PROJECTKEY"
-
For multiple project key support, just chain the pipe
git branch | ~/.git_show_jira_summary.sh KEYONE | ~/.git_show_jira_summary.sh KEYTWO