Summary
The dev_pr_milestone.sh script fails to assign a milestone when there are multiple open milestones matching the version pattern.
Root Cause
Missing pipe (|) between grep and head -n1 on lines 40-41:
grep -E '^[0-9]+\.[0-9]+\.[0-9]+$'
head -n1
This causes all matching milestones to be captured in the variable instead of just the first one.
Error Output
Assigning milestone: 19.0.0
20.0.0
'19.0.0
20.0.0' not found
Error: Process completed with exit code 1.
Fix
Add the missing pipe to properly chain the commands:
grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' |
head -n1