From 61842ebc70178a7fd968f1a0e4a342ea3aae6179 Mon Sep 17 00:00:00 2001 From: Kenzo Date: Wed, 7 Jan 2026 16:41:58 +0100 Subject: [PATCH] refactor(woodpecker): improve commit message handling for payload preparation - Redirected commit messages to a temporary file to handle special characters safely. - Adjusted jq payload process for better reliability. --- .woodpecker.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index dfde329..f7ba88b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -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}" \