From 328f248c43fc91762243a9463cd4bd805ad3c641 Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Tue, 22 Sep 2026 05:47:52 -0400 Subject: [PATCH] fix: bumpminor.sh changelog grep drops scoped feat/fix commits The grep/sed only matched unscoped conventional-commit subjects ("feat: ...", "fix: ..."), so every scoped commit ("feat(server): ...") was silently dropped from the generated changelog entry. Both 5.4.4 and 5.4.5 needed a manual follow-up fix for this. Broaden the pattern to accept an optional (scope) and drop it from the changelog line. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Uc9V1v7iXruubpoLiSE24M --- scripts/bumpminor.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/bumpminor.sh b/scripts/bumpminor.sh index c4bf03d..060cf8d 100755 --- a/scripts/bumpminor.sh +++ b/scripts/bumpminor.sh @@ -9,8 +9,10 @@ sed -i".bak" "s/\*\*Package:\*\* \`hbd\` v[0-9.]*/\*\*Package:\*\* \`hbd\` v$VE # Update CHANGELOG.md with commits since last tag LASTTAG=$(git describe --tags --abbrev=0 2>/dev/null || true) -ADDED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep "^feat:" | sed 's/^feat: /- /') -FIXED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep "^fix:" | sed 's/^fix: /- /') +# Matches both unscoped ("feat: ...") and scoped ("feat(server): ...") conventional-commit +# subjects; the scope is dropped from the changelog line. +ADDED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep -E "^feat(\([^)]*\))?:" | sed -E 's/^feat(\([^)]*\))?: /- /') +FIXED=$(git log "${LASTTAG:+$LASTTAG..}HEAD" --pretty="%s" | grep -E "^fix(\([^)]*\))?:" | sed -E 's/^fix(\([^)]*\))?: /- /') { printf "## [%s]\n" "$VER" [ -n "$ADDED" ] && printf "\n### Added\n%s\n" "$ADDED"