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

Co-authored-by: Matthias Heyman <matthias.heyman@ebo-enterprises.com>
This commit is contained in:
Matthias Heyman 2023-06-29 13:29:14 +02:00 committed by GitHub
parent 73c4764e78
commit 54779e5250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,7 +80,13 @@ function jira() {
issue_arg=${issue_arg##*/}
# Strip suffixes starting with _
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]}
fi
if [[ "${issue_arg:l}" = ${jira_prefix:l}* ]]; then
issue="${issue_arg}"
else