Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix newline handling if using commit_prefix or commit_message #75

Merged
merged 1 commit into from Nov 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions entrypoint.sh
Expand Up @@ -69,7 +69,7 @@ if [[ -n ${FILES_CHANGED} ]]; then
COMMIT_PARAMS+=("--no-edit")
git commit "${COMMIT_PARAMS[@]}"
elif [[ -n "${INPUT_COMMIT_MESSAGE}" || -n "${INPUT_COMMIT_PREFIX}" ]]; then
git commit "${COMMIT_PARAMS[@]}" -am "${INPUT_COMMIT_PREFIX}${INPUT_COMMIT_MESSAGE}" -m "Files changed:\n${FILES_CHANGED}"
git commit "${COMMIT_PARAMS[@]}" -am "${INPUT_COMMIT_PREFIX}${INPUT_COMMIT_MESSAGE}" -m "$(echo -e "Files changed:\n${FILES_CHANGED}")"
else
git commit "${COMMIT_PARAMS[@]}" -am "Files changed:" -m "${FILES_CHANGED}"
fi
Expand All @@ -87,10 +87,10 @@ fi
# Finish
{
echo "files_changed<<EOF"
echo "${FILES_CHANGED}"
echo -e "${FILES_CHANGED}"
echo "EOF"
echo "branch_name=${BRANCH}"
} >> "$GITHUB_OUTPUT"
} >> "${GITHUB_OUTPUT}"
if [[ ${RET_CODE} != "0" ]]; then
echo -e "\n[ERROR] Check log for errors."
exit 1
Expand Down