From 2491a493bc5e059aa704eefc5bb08c4ea87fbb18 Mon Sep 17 00:00:00 2001 From: Aam Date: Tue, 1 Oct 2024 14:50:30 +0200 Subject: [PATCH] fix(bumper): fix unbound variable on new repo 2 (#32) ## Summary by CodeRabbit - **Bug Fixes** - Improved the accuracy and consistency of status messages related to pull requests and pushes. - **New Features** - Introduced a new function for better retrieval of head labels in status messages. --- lib/message.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/message.sh b/lib/message.sh index 124e971..3b86f52 100644 --- a/lib/message.sh +++ b/lib/message.sh @@ -32,8 +32,8 @@ make_push_status() { COMPARE="" ADDITIONAL_INFO="" - if [[ -n "${BUMPER_CURRENT_VERSION}" ]]; then - COMPARE="**Changes**: [${BUMPER_CURRENT_VERSION}...${BUMPER_NEXT_VERSION}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/compare/${BUMPER_CURRENT_VERSION}...${BUMPER_NEXT_VERSION})" + if [[ -n "${BUMPER_CURRENT_VERSION:-}" ]]; then + COMPARE="**Changes**: [${BUMPER_CURRENT_VERSION:-}...${BUMPER_NEXT_VERSION}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/compare/${BUMPER_CURRENT_VERSION:-}...${BUMPER_NEXT_VERSION})" fi if [[ -n "${INPUT_BUMP_SEMVER}" && "${INPUT_BUMP_SEMVER}" == "true" ]]; then