Skip to content
Snippets Groups Projects
Unverified Commit cb8f016a authored by Roman Abdulmanov's avatar Roman Abdulmanov Committed by GitHub
Browse files

Fix Slack notification issue with quotes in the title (#31504)

parent 1c6fff19
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,12 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Format issue title (escape quotes)
uses: actions/github-script@v6
id: vars
with:
script: |
core.setOutput('issue_title', ${{ toJson(github.event.issue.title) }}.replaceAll(/"/g, '\\"'));
- name: Send escalated issue ${{ github.event.issue.number }} to Slack
id: slack
uses: slackapi/slack-github-action@v1.23.0
......@@ -21,7 +27,7 @@ jobs:
"type": "section",
"text": {
"type": "mrkdwn",
"text": "🔥🔥🔥 ${{ github.event.issue.title }}\n${{ github.event.issue.html_url }}"
"text": "🔥🔥🔥 ${{ steps.vars.outputs.issue_title }}\n${{ github.event.issue.html_url }}"
}
}
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment