Last active
November 6, 2019 17:00
-
-
Save carlosmcevilly/f69dde496029356968957ec8a6321e78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jira() { | |
export jira_browse_url='https://jira.organization.domain/browse' | |
export ticket=$1 | |
if [[ "$ticket" == '' ]]; then | |
# for tickets of the form "XYZ-1234" | |
export ticket=`git branch | grep '*' | perl -ne 's/.*\/(\w+\-\d+)/$1/; print;'` | |
fi | |
open "$jira_browse_url/$ticket" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment