|
|
|
@ -51,8 +51,14 @@ function jira() { |
|
|
|
echo "JIRA_DEFAULT_ACTION=$JIRA_DEFAULT_ACTION" |
|
|
|
echo "JIRA_DEFAULT_ACTION=$JIRA_DEFAULT_ACTION" |
|
|
|
else |
|
|
|
else |
|
|
|
# Anything that doesn't match a special action is considered an issue name |
|
|
|
# Anything that doesn't match a special action is considered an issue name |
|
|
|
|
|
|
|
# but `branch` is a special case that will parse the current git branch |
|
|
|
|
|
|
|
if [[ "$action" == "br" ]]; then |
|
|
|
|
|
|
|
local issue_arg=$(git rev-parse --abbrev-ref HEAD) |
|
|
|
|
|
|
|
local issue="${jira_prefix}${issue_arg}" |
|
|
|
|
|
|
|
else |
|
|
|
local issue_arg=$action |
|
|
|
local issue_arg=$action |
|
|
|
local issue="${jira_prefix}${issue_arg}" |
|
|
|
local issue="${jira_prefix}${issue_arg}" |
|
|
|
|
|
|
|
fi |
|
|
|
local url_fragment='' |
|
|
|
local url_fragment='' |
|
|
|
if [[ "$2" == "m" ]]; then |
|
|
|
if [[ "$2" == "m" ]]; then |
|
|
|
url_fragment="#add-comment" |
|
|
|
url_fragment="#add-comment" |
|
|
|
|