Skip to content

Commit 4a6b0b3

Browse files
authored
Remove special characters before calling xargs in notify comment (#3661)
1 parent a3cd442 commit 4a6b0b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/issue_comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
COMMENT_URL: ${{ github.event.comment.html_url }}
1818
USER: ${{ github.event.comment.user.login }}
1919
shell: bash
20-
run: echo $BODY | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}'
20+
run: echo $BODY | sed "s/\\\n/. /g; s/\\\r//g; s/[^a-zA-Z0-9 &().,:]//g" | xargs -I {} curl -s POST "$WEBHOOK_URL" -H "Content-Type:application/json" --data '{"body":"{}", "issue":"'$COMMENT_URL'", "user":"'$USER'"}'
2121

2222
adjust-labels:
2323
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)