mirror of
https://github.com/LukeHagar/slinky.git
synced 2025-12-06 04:21:20 +00:00
Refactor COMMENT_BODY construction in entrypoint.sh to use printf for improved formatting of markdown report.
This commit is contained in:
@@ -93,7 +93,7 @@ if [ "${COMMENT_PR_ARG}" = "true" ]; then
|
||||
echo "[slinky] GITHUB_REPOSITORY not set; skipping PR comment."
|
||||
else
|
||||
BODY_CONTENT="$(cat "${MD_OUT_ARG}")"
|
||||
COMMENT_BODY="<!-- slinky-report -->\n${BODY_CONTENT}"
|
||||
COMMENT_BODY="$(printf '%s\n%s\n' '<!-- slinky-report -->' "${BODY_CONTENT}")"
|
||||
|
||||
# Try to find an existing slinky comment to update
|
||||
COMMENTS_JSON=$(curl -sS -H "Authorization: Bearer ${GITHUB_TOKEN}" \
|
||||
|
||||
Reference in New Issue
Block a user