refactor(woodpecker): improve commit message handling for payload preparation
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
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:
@ -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}" \
|
||||
|
||||
Reference in New Issue
Block a user