-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(CI): escape PR title for slack webhook
- Loading branch information
1 parent
7f3a75d
commit 44acaf7
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: escape | ||
|
||
on: | ||
push: | ||
branches: ['canary'] | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
escape: | ||
name: escape | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: escape PR title in js | ||
env: | ||
PR_TITLE: ${{ github.event.pull_request.title }} | ||
shell: bash | ||
run: | | ||
node -e 'console.log(`title=${JSON.stringify({ title: process.env.PR_TITLE })}`)' | ||
- name: escape PR title via expression | ||
shell: bash | ||
run: | | ||
echo ${{ toJSON({ title: github.event.pull_request.title }) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters