Skip to content

Commit c4a5c8b

Browse files
authored
Merge pull request #4049 from parasharrajat/actions-deployblock
[NO QA] fix: action failure on invalid String in BASH
2 parents f9d0058 + 4f822c0 commit c4a5c8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/deployBlocker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: |
3232
echo "DEPLOY_BLOCKER_URL=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV
3333
echo "DEPLOY_BLOCKER_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
34-
echo "DEPLOY_BLOCKER_TITLE=${{ github.event.pull_request.title }}" >> $GITHUB_ENV
34+
echo "DEPLOY_BLOCKER_TITLE=$(sed -e "s/'/'\\\\''/g; s/\`/\\\\\`/g; 1s/^/'/; \$s/\$/'/" <<< ${{ github.event.pull_request.title }})" >> $GITHUB_ENV
3535
3636
- name: Update StagingDeployCash with new deploy blocker
3737
uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@main
@@ -54,7 +54,7 @@ jobs:
5454
channel: '#deployer',
5555
attachments: [{
5656
color: "#DB4545",
57-
text: '💥 New E.cash Deploy Blocker: <${{ env.DEPLOY_BLOCKER_URL }}|${{ env.DEPLOY_BLOCKER_TITLE }}>',
57+
text: '💥 New E.cash Deploy Blocker: <${{ env.DEPLOY_BLOCKER_URL }}|'+ `${{ env.DEPLOY_BLOCKER_TITLE }}`.replace(/(^'|'$)/gi, '').replace(/'\''/gi,'\'') + '>',
5858
}]
5959
}
6060
env:

0 commit comments

Comments
 (0)