From 5b1da06715ede7a5f29b7a65bc12bdb4123a4ed2 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Fri, 29 Oct 2021 19:40:26 +0000 Subject: [PATCH] Build/Test Tools: Escape `$` within commit messages for `$variables. This ensures the variables are preserved in the Slack message. Props ocean90, desrosj. See #53363. git-svn-id: https://develop.svn.wordpress.org/trunk@51952 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/slack-notifications.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/slack-notifications.yml b/.github/workflows/slack-notifications.yml index b75bc5b01d..021f10fb17 100644 --- a/.github/workflows/slack-notifications.yml +++ b/.github/workflows/slack-notifications.yml @@ -110,7 +110,7 @@ jobs: - name: Prepare commit message. id: commit-message run: | - COMMIT_MESSAGE=$(cat <<'EOF' | awk 'NR==1' | sed 's/`/\\`/g' | sed 's/\"/\\\\"/g' + COMMIT_MESSAGE=$(cat <<'EOF' | awk 'NR==1' | sed 's/`/\\`/g' | sed 's/\"/\\\\"/g' | sed 's/\$/\\$/g' ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_commit.message || github.event.head_commit.message }} EOF )