File tree 1 file changed +13
-9
lines changed
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -82,16 +82,20 @@ main() {
82
82
--json mergeCommit,labels,author \
83
83
--jq ' .[] | "\( .mergeCommit.oid ) author:\( .author.login ) labels:\(["label:\( .labels[].name )"] | join(" "))"'
84
84
) "
85
- mapfile -t pr_metadata_raw <<< " $pr_list_out "
85
+
86
86
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
95
99
96
100
for commit in " ${commits[@]} " ; do
97
101
mapfile -d ' ' -t parts <<< " $commit"
You can’t perform that action at this time.
0 commit comments