File tree 1 file changed +8
-5
lines changed
.github/workflows/scripts
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,10 @@ main() {
169
169
# Process each PR to build issue mappings:
170
170
echo " Processing PRs for issue references..."
171
171
pr_count=0
172
- while IFS= read -r pr; do
172
+
173
+ total_prs=$( echo " $open_prs " | jq ' length' )
174
+ for i in $( seq 0 $(( total_prs- 1 )) ) ; do
175
+ pr=$( echo " $open_prs " | jq -c " .[$i ]" )
173
176
pr_number=$( echo " $pr " | jq -r ' .number' )
174
177
pr_body=$( echo " $pr " | jq -r ' .body' )
175
178
resolved_issues=$( extract_resolved_issues " $pr_body " )
@@ -182,9 +185,9 @@ main() {
182
185
for issue in $resolved_issues ; do
183
186
# Find existing issue index
184
187
index=-1
185
- for i in " ${! issue_prs_keys[@]} " ; do
186
- if [ " ${issue_prs_keys[$i ]} " = " $issue " ]; then
187
- index=$i
188
+ for j in " ${! issue_prs_keys[@]} " ; do
189
+ if [ " ${issue_prs_keys[$j ]} " = " $issue " ]; then
190
+ index=$j
188
191
break
189
192
fi
190
193
done
@@ -195,7 +198,7 @@ main() {
195
198
issue_prs_values[index]=" ${issue_prs_values[index]} $pr_number "
196
199
fi
197
200
done
198
- done < <( echo " ${open_prs} " | jq -c ' .[] ' )
201
+ done
199
202
200
203
# Process the mappings to find duplicates:
201
204
declare -a should_be_labeled_list
You can’t perform that action at this time.
0 commit comments