Skip to content

Commit

Permalink
use perl
Browse files Browse the repository at this point in the history
  • Loading branch information
samwaseda committed Aug 13, 2024
1 parent a0c0478 commit 19c22d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/label-to-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
TITLE="${{ github.event.pull_request.title || github.event.issue.title }}"
LABEL_TO_REMOVE="${{ steps.check_label.outputs.label }}"
NEW_TITLE=$(echo "$TITLE" | tr -d "$LABEL_TO_REMOVE")
NEW_TITLE=$(echo "$TITLE" | perl -pe "s/\Q$LABEL_TO_REMOVE\E//")
NEW_TITLE=$(echo "$NEW_TITLE" | sed 's/ / /g' | sed 's/^ *//;s/ *$//') # Remove extra spaces
if [[ $TITLE != ${NEW_TITLE} ]]; then
curl -s -X PATCH \
Expand Down

0 comments on commit 19c22d1

Please sign in to comment.