File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 4040 m_max_size : ' 500'
4141 l_max_size : ' 1000'
4242 fail_if_xl : ' false'
43- message_if_xl : ' This PR is sooooo big! Please, split it 😊'
43+ message_if_xl : ' This PR is so big! Please, split it 😊'
4444` ` `
4545
4646> If you want, you can customize all ` *_max_size` with the size that fits in your project.
Original file line number Diff line number Diff line change @@ -18,9 +18,8 @@ github::add_label_to_pr() {
1818
1919 local -r body=$( curl -sSL -H " Authorization: token $GITHUB_TOKEN " -H " $GITHUB_API_HEADER " " $GITHUB_API_URI /repos/$GITHUB_REPOSITORY /pulls/$1 " )
2020 local labels=$( echo " $body " | jq .labels | jq -r " .[] | .name" | grep -v " size/" )
21- labels+=(" $label_to_add " )
22-
23- local -r comma_separated_labels=$( github::format_labels " ${labels[@]/#/ } " )
21+ labels=$( printf " %s\n%s" " $labels " " $label_to_add " )
22+ local -r comma_separated_labels=$( github::format_labels " $labels " )
2423
2524 log::message " Final labels: $comma_separated_labels "
2625
@@ -34,11 +33,16 @@ github::add_label_to_pr() {
3433}
3534
3635github::format_labels () {
36+ SAVEIFS=$IFS
37+ IFS=$' \n '
38+ local -r labels=($@ )
39+ IFS=$SAVEIFS
3740 quoted_labels=()
38- for label in " ${@ } " ; do
39- if [ -n " $label " ]; then
40- quoted_labels+=(" $( str::quote " $label " ) " )
41- fi
41+
42+ for (( i = 0 ; i < ${# labels[@]} ; i++ )) ; do
43+ # echo "Label $i: ${labels[$i]}"
44+ label=" ${labels[$i]} "
45+ quoted_labels+=(" $( str::quote " $label " ) " )
4246 done
4347
4448 coll::join_by " ," " ${quoted_labels[@]/#/ } "
You can’t perform that action at this time.
0 commit comments