Skip to content

Commit

Permalink
use sed to replace chars in title
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Nov 27, 2023
1 parent 3de5ee0 commit 7f2060e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/deployBlocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Escape html characters in GH issue title
env:
GH_ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
escaped_title=$(echo "$GH_ISSUE_TITLE" | sed -e 's/&/\&amp;/g; s/</\&lt;/g; s/>/\&gt;/g; s/"/\&quot;/g; s/'"'"'/\&#039;/g; s/|/\&verbar;/g')
echo "GH_ISSUE_TITLE=$escaped_title" >> "$GITHUB_ENV"
- name: 'Post the issue in the #expensify-open-source slack room'
if: ${{ success() }}
uses: 8398a7/action-slack@v3
Expand All @@ -32,7 +39,7 @@ jobs:
channel: '#expensify-open-source',
attachments: [{
color: "#DB4545",
text: '💥 We have found a New Expensify Deploy Blocker, if you have any idea which PR could be causing this, please comment in the issue: <${{ github.event.issue.html_url }}|${{ github.event.issue.title | escape }}>'
text: '💥 We have found a New Expensify Deploy Blocker, if you have any idea which PR could be causing this, please comment in the issue: <${{ github.event.issue.html_url }}|${{ env.GH_ISSUE_TITLE }}>'
}]
}
env:
Expand Down

0 comments on commit 7f2060e

Please sign in to comment.