Skip to content

Commit e15b900

Browse files
authored
ci: detect conventional commits in squash-merge body bullets (#107)
The version job skipped releasing PR #106 because its squash-merge subject ("Harden Mach-O relocation and add LC_RPATH parity (#106)") is not itself a conventional commit. GitHub's default squash-merge preserves each original commit as a "* type: ..." bullet in the body, so extend detection to include those lines — scan both subjects and body bullets instead of subjects alone.
1 parent 03b642f commit e15b900

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ jobs:
6262
echo "Commits since ${LATEST_TAG}:"
6363
echo "$SUBJECTS" | sed 's/^/ /'
6464
65+
# Collect candidate conventional-commit lines from both subjects
66+
# and body bullets. GitHub squash-merges put the PR title in the
67+
# subject and nest each original commit as "* type: ..." in the
68+
# body, so scanning subjects alone misses squash-merged PRs whose
69+
# title is not itself a conventional commit.
70+
CANDIDATES=$(
71+
printf '%s\n' "$SUBJECTS"
72+
printf '%s\n' "$BODIES" | sed -nE 's/^[[:space:]]*\*[[:space:]]+//p'
73+
)
74+
6575
# Determine bump type from conventional commits
6676
# Priority: major > minor > patch > none
6777
BUMP="none"
@@ -84,7 +94,7 @@ jobs:
8494
if echo "$msg" | grep -qE '^(fix|perf|refactor)(\(.+\))?:'; then
8595
[[ "$BUMP" == "none" ]] && BUMP="patch"
8696
fi
87-
done <<< "$SUBJECTS"
97+
done <<< "$CANDIDATES"
8898
8999
if [[ "$BUMP" == "none" ]]; then
90100
echo "No releasable commits (only docs/ci/chore/etc.) — skipping release"

0 commit comments

Comments
 (0)