refactor(woodpecker): improve commit message handling for payload preparation
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

- Redirected commit messages to a temporary file to handle special characters safely.
- Adjusted jq payload process for better reliability.
This commit is contained in:
2026-01-07 16:41:58 +01:00
parent 4e2418116f
commit 61842ebc70

View File

@ -100,7 +100,10 @@ steps:
commands:
- apk add --no-cache curl jq
- |
PAYLOAD=$(printf '%s' "${CI_COMMIT_MESSAGE}" | jq -Rs \
# Schreibe Commit-Message in Datei (sicher gegen Shell-Sonderzeichen)
printf '%s\n' "$CI_COMMIT_MESSAGE" > /tmp/commit_msg.txt
PAYLOAD=$(cat /tmp/commit_msg.txt | jq -Rs \
--arg title "✅ Build #${CI_BUILD_NUMBER} - Success" \
--arg repo "${CI_REPO}" \
--arg branch "${CI_COMMIT_BRANCH}" \
@ -138,7 +141,10 @@ steps:
commands:
- apk add --no-cache curl jq
- |
PAYLOAD=$(printf '%s' "${CI_COMMIT_MESSAGE}" | jq -Rs \
# Schreibe Commit-Message in Datei (sicher gegen Shell-Sonderzeichen)
printf '%s\n' "$CI_COMMIT_MESSAGE" > /tmp/commit_msg.txt
PAYLOAD=$(cat /tmp/commit_msg.txt | jq -Rs \
--arg title "❌ Build #${CI_BUILD_NUMBER} - Failure" \
--arg repo "${CI_REPO}" \
--arg branch "${CI_COMMIT_BRANCH}" \