From 0c8a0b5992c0842542afdd2c2f1aede90d603607 Mon Sep 17 00:00:00 2001 From: MisRob Date: Thu, 29 Feb 2024 09:12:52 +0100 Subject: [PATCH] Attempt to fix GH notification action --- .github/workflows/notify_team_new_comment.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notify_team_new_comment.yml b/.github/workflows/notify_team_new_comment.yml index 5ea9037a2c6..c53dc869cc3 100644 --- a/.github/workflows/notify_team_new_comment.yml +++ b/.github/workflows/notify_team_new_comment.yml @@ -17,14 +17,19 @@ jobs: runs-on: ubuntu-latest steps: + - name: Escape title double quotes + id: escape_title + run: | + title=${{ github.event.issue.title }} + echo "ISSUE_TITLE=${title//\"/\\\"}" >> "$GITHUB_OUTPUT" + - name: Send message to Slack channel env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK - ISSUE_TITLE: ${{ toJSON(github.event.issue.title) }} uses: slackapi/slack-github-action@v1.25.0 with: payload: | { - "text": "*[Kolibri] New comment on issue: <${{ github.event.issue.html_url }}#issuecomment-${{ github.event.comment.id }}|$ISSUE_TITLE by ${{ github.event.comment.user.login }}>*" + "text": "*[Kolibri] New comment on issue: <${{ github.event.issue.html_url }}#issuecomment-${{ github.event.comment.id }}|${{ steps.escape_title.outputs.ISSUE_TITLE }} by ${{ github.event.comment.user.login }}>*" }