Skip to content

Commit 3e8a052

Browse files
committed
sanitize pr body for benchmark check
1 parent 10ff448 commit 3e8a052

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ jobs:
2727
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}")
2828
PR_TITLE=$(echo "$PR_DATA" | jq -r '.title')
2929
PR_BODY=$(echo "$PR_DATA" | jq -r '.body')
30+
# Ensure PR_BODY is single-line and sanitized for GitHub env vars
31+
PR_BODY_ESCAPED=$(echo "$PR_BODY" | tr '\n' ' ' | tr '\r' ' ')
3032
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_ENV
31-
echo "PR_BODY=$PR_BODY" >> $GITHUB_ENV
33+
echo "PR_BODY=$PR_BODY_ESCAPED" >> $GITHUB_ENV
3234
- name: Check for '[no benchmark]'
3335
id: check
3436
run: |

0 commit comments

Comments
 (0)