🐛 fix(ci): version-bump fallback for workflow_dispatch trigger #31
Reference in New Issue
Block a user
Delete Branch "fix/ci-version-bump-workflow-dispatch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Manually-triggered CI runs (
workflow_dispatch) were failing on the version-bump step even when tests passed, because${{ github.event.head_commit.message }}is empty for that event type.ci-version-bump.shthen exits 1 with "Error: Commit message not provided".Fix
Fall back to
git log -1 --pretty=%Bwhen the event context provides no commit message. Push-event behavior unchanged.Observed in
CI run #615 (manually triggered after PR #28 merge): build OK, BDD passed (49.7% coverage), but version-bump failed → entire workflow marked failure. Same pattern would have masked many other valid runs.
Test plan
The CI workflow_dispatch event provides no head_commit, so ${{ github.event.head_commit.message }} expands to empty. ci-version-bump.sh requires a commit message and exits 1 if absent, causing manually-triggered CI runs to fail in the version-bump step even though the actual tests passed. Fix: fall back to `git log -1 --pretty=%B` when the GitHub event context provides no commit message. Maintains push-event behavior unchanged (head_commit.message still primary source). Observed in CI #615 (manual trigger after PR #28 merge): tests passed, build OK, but version-bump failed → entire workflow marked FAILURE. 🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>