A simple CLI to switch to git branches based on one's JIRA tickets, only supports Jira Cloud.
brew tap freenowtech/cli
brew install freenowtech/cli/git-jira
Create a Personal Access Token (PAT) in JIRA as per instruction.
Add $JIRA_USER
, $JIRA_API_TOKEN
and $JIRA_INSTANCE
to your favorite shell:
Important: $JIRA_INSTANCE
needs to be pointed at the atlassian.net
domain, for example htts://x.atlassian.net
.
echo -n 'export JIRA_USER=YOUR_USER' >> ~/.zshrc
echo -n 'export JIRA_API_TOKEN=YOUR_API_TOKEN' >> ~/.zshrc
echo -n 'export JIRA_INSTANCE=YOUR_INSTANCE' >> ~/.zshrc
source ~/.zshrc
Run with git-jira
or git jira
.
-
Default:
feature/SUP-1344-bla
-
--no-prefix
➡️SUP-1344-bla
-
--prefix blubb
➡️blubb/SUP-1344-bla