Skip to content

Commit d14c558

Browse files
authored
[chore] enable multiple components (#2209)
1 parent 1497838 commit d14c558

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/scripts/prepare-new-pr.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ if [ $COUNT -eq 1 ]; then
3636
gh pr edit "${PR}" --add-label "${CHANGE_TYPE}" || true
3737
AREA=$(awk -F': ' '/^component:/ {print $2}' "$PR_CHANGELOG_PATH/$CHLOG" | xargs)
3838
echo $AREA
39-
gh pr edit "${PR}" --add-label "area:${AREA}" || true
39+
if [[ "$AREA" == \[*\] ]]; then
40+
cleaned=$(echo "$AREA" | tr -d '[]' | tr ',' '\n')
41+
else
42+
cleaned="$AREA"
43+
fi
44+
for item in $(echo "$cleaned" | tr ',' ' '); do
45+
gh pr edit "${PR}" --add-label "area:${item}" || true
46+
done
4047
else
4148
echo "Found multiple changelog files. Ignoring this change."
4249
fi

0 commit comments

Comments
 (0)