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 for echo -e #83

Merged
merged 1 commit into from
Apr 20, 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
10 changes: 6 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ done
if [[ -z "${INPUT_GITHUB_TOKEN}" ]]; then
# shellcheck disable=SC2016
MESSAGE='Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".'
echo "[ERROR] ${MESSAGE}"
echo -e "[ERROR] ${MESSAGE}"
exit 1
fi

Expand Down Expand Up @@ -129,12 +129,14 @@ TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed ':a;N;$!ba; s|\^No
if [[ -z "${PR_NUMBER}" ]]; then
echo -e "\nSetting all arguments..."
if [[ -n "${INPUT_TITLE}" ]]; then
TITLE=$(echo "${INPUT_TITLE}" | head -1)
TITLE=$(echo -e "${INPUT_TITLE}" | head -1)
else
TITLE=$(git log -1 --pretty=%s | head -1)
fi
# shellcheck disable=SC2001
TEMPLATE=$(echo "${TEMPLATE}" | sed 's/\`/\\`/g') # fix for '`' marks in template
TITLE=$(echo -e "${TITLE}" | sed 's/\`/\\`/g') # fix for '`' marks in title
# shellcheck disable=SC2001
TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's/\`/\\`/g') # fix for '`' marks in template
ARG_LIST=()
ARG_LIST+=("-m \"${TITLE}\"")
ARG_LIST+=("-m \"${TEMPLATE}\"")
Expand All @@ -154,7 +156,7 @@ if [[ -z "${PR_NUMBER}" ]]; then
ARG_LIST+=("-d")
fi
else
echo "${TEMPLATE}" > /tmp/template
echo -e "${TEMPLATE}" > /tmp/template
fi

if [[ -z "${PR_NUMBER}" ]]; then
Expand Down