entrypoint.sh: use awk because of multiline support
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Tom Neuber 2024-10-09 13:58:48 +02:00
parent 4694e9ce7c
commit 3734fabe43
Signed by: tom
GPG key ID: F17EFE4272D89FF6

View file

@ -8,8 +8,6 @@ RANDOM_INDEX=$(( RANDOM % NUM_MESSAGES ))
MESSAGE=$(yq eval ".messages[$RANDOM_INDEX]" "$MESSAGE_FILE")
PLUGIN_PR_BODY=$(echo "$PLUGIN_PR_BODY" | sed "s/{- random-pr-message -}/$MESSAGE/")
echo "$PLUGIN_PR_BODY"
PLUGIN_PR_BODY=$(awk -v msg="$MESSAGE" '{gsub(/\{- random-pr-message -\}/, msg)}1' <<< "$PLUGIN_PR_BODY")
/gitea-pull-request-create-plugin