Unverified Commit 54779e52 authored by Matthias Heyman's avatar Matthias Heyman Committed by GitHub

fix(jira): support identifiers delimited with a hyphen (#11782)

parent 73c4764e
...@@ -80,7 +80,13 @@ function jira() { ...@@ -80,7 +80,13 @@ function jira() {
issue_arg=${issue_arg##*/} issue_arg=${issue_arg##*/}
# Strip suffixes starting with _ # Strip suffixes starting with _
issue_arg=(${(s:_:)issue_arg}) issue_arg=(${(s:_:)issue_arg})
# If there is only one part, it means that there is a different delimiter. Try with -
if [[ ${#issue_arg[@]} = 1 && ${issue_arg} == *-* ]]; then
issue_arg=(${(s:-:)issue_arg})
issue_arg="${issue_arg[1]}-${issue_arg[2]}"
else
issue_arg=${issue_arg[1]} issue_arg=${issue_arg[1]}
fi
if [[ "${issue_arg:l}" = ${jira_prefix:l}* ]]; then if [[ "${issue_arg:l}" = ${jira_prefix:l}* ]]; then
issue="${issue_arg}" issue="${issue_arg}"
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment