Skip to content

Commit

Permalink
Allow labels with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Apr 27, 2020
1 parent 0009b99 commit 2a8d675
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ github::add_label_to_pr() {
}

github::format_labels() {
local -r quoted_labels=$(echo "$@" | coll::map str::quote)
readarray -t splitted_quoted_labels <<<"$quoted_labels"
quoted_labels=()
for i in "${@}"; do
:
quoted_labels+=("$(str::quote "$i")")
done

coll::join_by "," "${splitted_quoted_labels[@]/#/}"
coll::join_by "," "${quoted_labels[@]/#/}"
}

github::comment() {
Expand Down

0 comments on commit 2a8d675

Please sign in to comment.