File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 27
27
-H "Accept: application/vnd.github.v3+json" \
28
28
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
29
29
https://api.github.com/repos/${{ github.repository }}/commits/$COMMIT_ID/pulls)
30
- # the printf helps escape characters so that jq can parse the output.
31
- # the sed removes carriage returns so that the body is easier to parse later.
32
- PR_BODY=$(printf '%s' "$PR" | jq '.[0].body' | sed 's/\\r//g')
30
+ # The printf helps escape characters so that jq can parse the output.
31
+ # The sed removes carriage returns so that the body is easier to parse later, and
32
+ # escapes backticks so that they are not executed as commands.
33
+ PR_BODY=$(printf '%s' "$PR" | jq '.[0].body' | sed 's/\\r//g' | sed 's/`/\\`/g')
33
34
echo ::set-output name=pr_body::${PR_BODY}
34
35
- name : Extract Changelog
35
36
id : extract_changelog
You can’t perform that action at this time.
0 commit comments