Strip out newlines in issue comment (not markdown)

This commit is contained in:
Nick Bolton 2024-09-06 14:20:40 +01:00
parent 0fe0532355
commit 6b3b65be35

View file

@ -46,7 +46,10 @@ jobs:
script: |
issue_number = process.env.ISSUE_NUMBER
body = process.env.COMMENT_BODY
body = body.replace(/\\n/g, '\n')
// Strip newlines, since GitHub comments are not markdown.
body = body.replace(/\\n/g, ' ')
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,