fix(ci): Match scoped conventional-commit prefixes in changelog script

The type regex only matched "type: ", so scoped commits like
"fix(web): ..." all fell into the catch-all Other section instead of
their proper one.
This commit is contained in:
abdus committed 2026-10-08 21:42:40 +02:00
1 parent 4e635bd27c
commit 4b78236a01
1 file changed
+2 -2
+2 -2
View File
@@ -27,14 +27,14 @@ label_for() {
}
commits=$(git log ${range} --reverse --pretty='format:%s')
known_pattern="^(feat|fix|refactor|perf|docs|test|ci|build|chore): "
known_pattern="^(feat|fix|refactor|perf|docs|test|ci|build|chore)(\([^)]*\))?!?: "
first_section=1
for type in $types other; do
if [ "$type" = "other" ]; then
entries=$(printf '%s\n' "$commits" | grep -v -E "$known_pattern" | sed 's/^/- /' || true)
else
entries=$(printf '%s\n' "$commits" | grep -E "^${type}: " | sed -E "s/^${type}: /- /" || true)
entries=$(printf '%s\n' "$commits" | grep -E "^${type}(\([^)]*\))?!?: " | sed -E "s/^${type}(\([^)]*\))?!?: /- /" || true)
fi
[ -z "$entries" ] && continue