From d14f6a2a6362a1e4283cdb4d6eb1955ba9c8a0a9 Mon Sep 17 00:00:00 2001 From: Yos Riady <1084226+yosriady@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:21:31 +0700 Subject: [PATCH 1/2] fix release note commit links --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55578f4..19f5828 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,9 +110,12 @@ jobs: RELEASE_DATE=$(date +%Y-%m-%d) if [ -n "$PREV_TAG" ]; then - COMMITS=$(git log ${PREV_TAG}..HEAD --pretty=format:"%s %h" --no-merges) + # Separate the subject and hash with a real tab because the loop + # below parses each entry with IFS=$'\t'. Using spaces here left + # `hash` empty and produced an empty Markdown link (`()`). + COMMITS=$(git log "${PREV_TAG}..HEAD" --pretty=format:'%s%x09%h' --no-merges) else - COMMITS=$(git log --pretty=format:"%s %h" --no-merges) + COMMITS=$(git log --pretty=format:'%s%x09%h' --no-merges) fi FEATURES="" From 9e0398b11384c3ab60e4f64e5a45f9352c71fa8b Mon Sep 17 00:00:00 2001 From: Yos Riady <1084226+yosriady@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:31:31 +0700 Subject: [PATCH 2/2] harden release note commit parsing --- .github/workflows/release.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 19f5828..14ea331 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -110,20 +110,24 @@ jobs: RELEASE_DATE=$(date +%Y-%m-%d) if [ -n "$PREV_TAG" ]; then - # Separate the subject and hash with a real tab because the loop - # below parses each entry with IFS=$'\t'. Using spaces here left - # `hash` empty and produced an empty Markdown link (`()`). - COMMITS=$(git log "${PREV_TAG}..HEAD" --pretty=format:'%s%x09%h' --no-merges) + # Put the hash first and separate it from the subject with a real + # tab. The loop below validates the hash before making a link, so + # malformed log output cannot silently publish an empty URL. + COMMITS=$(git log "${PREV_TAG}..HEAD" --pretty=format:'%h%x09%s' --no-merges) else - COMMITS=$(git log --pretty=format:'%s%x09%h' --no-merges) + COMMITS=$(git log --pretty=format:'%h%x09%s' --no-merges) fi FEATURES="" FIXES="" OTHER="" - while IFS=$'\t' read -r message hash; do + while IFS=$'\t' read -r hash message; do [ -z "$message" ] && continue + if [[ ! $hash =~ ^[0-9a-f]+$ ]]; then + echo "❌ Could not parse commit hash for release-note entry: $message" >&2 + exit 1 + fi if [[ $message =~ \(#([0-9]+)\) ]]; then PR_NUM="${BASH_REMATCH[1]}" CLEAN_MESSAGE=$(echo "$message" | sed -E 's/ ?\(#[0-9]+\)//')