Skip to content

Instantly share code, notes, and snippets.

@carlosmcevilly
Last active November 6, 2019 17:00
Show Gist options
  • Save carlosmcevilly/f69dde496029356968957ec8a6321e78 to your computer and use it in GitHub Desktop.
Save carlosmcevilly/f69dde496029356968957ec8a6321e78 to your computer and use it in GitHub Desktop.
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