Skip to content

Commit 9c0427b

Browse files
authored
chore(workflows): updating new issue workflow (#1670)
Using an environment variable to escape the Title instead of `sed`.
1 parent 209cf5c commit 9c0427b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/new_issue.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ jobs:
2121
- name: Run webhook curl command
2222
env:
2323
WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_WEBHOOK_URL }}
24+
ISSUE: ${{toJson(github.event.issue.title)}}
2425
shell: bash
25-
run: echo "${{github.event.issue.title}}" | sed -e "s/[\`\'\"]/ /g" | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"{}", "issueUrl":"${{github.event.issue.html_url}}", "user":"${{github.event.issue.user.login}}"}'
26+
run: echo $ISSUE | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"issue":"{}", "issueUrl":"${{github.event.issue.html_url}}", "user":"${{github.event.issue.user.login}}"}'

0 commit comments

Comments
 (0)