Skip to content

Commit

Permalink
remove tr
Browse files Browse the repository at this point in the history
  • Loading branch information
flukolo4ek committed Oct 14, 2024
1 parent 241d7e8 commit b635ce1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/.scripts/get_labels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ done
for label in $COMPONENT_LABELS
do
if [[ $PR_TITLE =~ [a-z]+\(.*$label.*\):* ]]; then
LABELS_TO_ADD+=" $COMPONENT_LABELS_PREFIX$label"
LABELS_TO_ADD+="\n$COMPONENT_LABELS_PREFIX$label"
fi

done

LABELS_TO_ADD=$(echo $LABELS_TO_ADD | tr ' ' '\n' | sort | tr '\n' ' ')
LABELS_TO_ADD=$(echo $LABELS_TO_ADD | sort | tr '\n' ',')
echo labels_to_add=$LABELS_TO_ADD >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runs:
id: add_labels
shell: bash
run: |
LABELS_TO_ADD=$( echo "${{ steps.get_labels.outputs.labels_to_add }}" | tr ' ' ',')
LABELS_TO_ADD="${{ steps.get_labels.outputs.labels_to_add }}"
echo LABELS_TO_ADD=$LABELS_TO_ADD
gh pr edit $PR_NUMBER --repo $REPO --add-label $LABELS_TO_ADD
Expand Down

0 comments on commit b635ce1

Please sign in to comment.