From 19c22d17a6d231f42d45faccbf6a43884a2a5f3a Mon Sep 17 00:00:00 2001 From: samwaseda Date: Tue, 13 Aug 2024 19:59:13 +0000 Subject: [PATCH] use perl --- .github/workflows/label-to-title.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/label-to-title.yml b/.github/workflows/label-to-title.yml index b51914751..6301fd1a7 100644 --- a/.github/workflows/label-to-title.yml +++ b/.github/workflows/label-to-title.yml @@ -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 \