Skip to content

Commit

Permalink
[bugfix] Don't allow empty labels
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Apr 28, 2020
1 parent aa03cf7 commit 18be839
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ github::add_label_to_pr() {

github::format_labels() {
quoted_labels=()
for i in "${@}"; do
:
quoted_labels+=("$(str::quote "$i")")
for label in "${@}"; do
if [ -n "$label" ]; then
quoted_labels+=("$(str::quote "$label")")
fi
done

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

0 comments on commit 18be839

Please sign in to comment.