File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -82,16 +82,20 @@ main() {
8282 --json mergeCommit,labels,author \
8383 --jq ' .[] | "\( .mergeCommit.oid ) author:\( .author.login ) labels:\(["label:\( .labels[].name )"] | join(" "))"'
8484 ) "
85- mapfile -t pr_metadata_raw <<< " $pr_list_out "
85+
8686 declare -A authors labels
87- for entry in " ${pr_metadata_raw[@]} " ; do
88- commit_sha_long=${entry%% * }
89- commit_author=${entry#* author: }
90- commit_author=${commit_author%% * }
91- authors[$commit_sha_long ]=$commit_author
92- all_labels=${entry#* labels: }
93- labels[$commit_sha_long ]=$all_labels
94- done
87+ if [[ -n $pr_list_out ]]; then
88+ mapfile -t pr_metadata_raw <<< " $pr_list_out"
89+
90+ for entry in " ${pr_metadata_raw[@]} " ; do
91+ commit_sha_long=${entry%% * }
92+ commit_author=${entry#* author: }
93+ commit_author=${commit_author%% * }
94+ authors[$commit_sha_long ]=$commit_author
95+ all_labels=${entry#* labels: }
96+ labels[$commit_sha_long ]=$all_labels
97+ done
98+ fi
9599
96100 for commit in " ${commits[@]} " ; do
97101 mapfile -d ' ' -t parts <<< " $commit"
You can’t perform that action at this time.
0 commit comments