This shell script allows one to list all branches in the current repo and also do a lookup within JIRA to show the results. Example:
Ref Name Upstream JIRA Status Last update
689f9e7 PROJ-776-something-something-reconfigure origin Code Review 13 days ago
043ff1e PROJ-827-some-particular-task origin Failed Testing 13 days ago
3fa55b0 PROJ-849-yet-another-task. origin Code Review 2 hours ago
818602e dev origin - 2 hours ago
c0b69b8 master origin - 5 weeks ago
de7881c staging origin - 2 weeks ago
c0b69b8 origin/HEAD n/a - 5 weeks ago
c9b609f origin/PROJ-776-something-something-reconfigure n/a Code Review 3 hours ago
d1955fd origin/PROJ-827-some-particular-task n/a Failed Testing 13 days ago
60bc724 origin/PROJ-849-yet-another-task n/a Code Review 2 hours ago
818602e origin/dev n/a - 2 hours ago
c0b69b8 origin/master n/a - 5 weeks ago
693efcc origin/staging n/a - 5 weeks ago
Put git-branch-info.sh
into your path somewhere.
Install JIRA CLI:
npm install -g jira-cl
You'll need to run the configuration first, of course, and make sure that the jira
command is in your path.
This is really just a hack-job. It works, but I don't keep a lot of branches in my repos. It usually takes 4-5 seconds to run so roughly 1/2 second per ticket.