mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
fix(scripts): check if PR list is empty (#8805)
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
This commit is contained in:
@ -82,8 +82,11 @@ main() {
|
||||
--json mergeCommit,labels,author \
|
||||
--jq '.[] | "\( .mergeCommit.oid ) author:\( .author.login ) labels:\(["label:\( .labels[].name )"] | join(" "))"'
|
||||
)"
|
||||
mapfile -t pr_metadata_raw <<<"$pr_list_out"
|
||||
|
||||
declare -A authors labels
|
||||
if [[ -n $pr_list_out ]]; then
|
||||
mapfile -t pr_metadata_raw <<<"$pr_list_out"
|
||||
|
||||
for entry in "${pr_metadata_raw[@]}"; do
|
||||
commit_sha_long=${entry%% *}
|
||||
commit_author=${entry#* author:}
|
||||
@ -92,6 +95,7 @@ main() {
|
||||
all_labels=${entry#* labels:}
|
||||
labels[$commit_sha_long]=$all_labels
|
||||
done
|
||||
fi
|
||||
|
||||
for commit in "${commits[@]}"; do
|
||||
mapfile -d ' ' -t parts <<<"$commit"
|
||||
|
Reference in New Issue
Block a user