Skip to content

fix(release): add conventional commits to semantic-release - #656

Merged
maxtechera merged 1 commit into
stagingfrom
fix/release-automation-conventional-commits
Nov 3, 2025
Merged

fix(release): add conventional commits to semantic-release#656
maxtechera merged 1 commit into
stagingfrom
fix/release-automation-conventional-commits

Conversation

@maxtechera

Copy link
Copy Markdown
Collaborator

Problem

GitHub releases were being created but had empty release notes (e.g., v1.7.2).

Root Cause:

  • Merge commits used Release: Staging to Production - DATE format
  • semantic-release couldn't parse this format (not conventional commits)
  • Release notes generator had nothing to work with → empty body

Solution

Configure semantic-release to use conventional commits format and enforce it via git hooks.

Changes

1. .releaserc.json - semantic-release Configuration

  • Added conventionalcommits preset for proper commit parsing
  • Configured release notes generator to group by type (Features, Bug Fixes, etc.)
  • Added rule for chore(release) commits to trigger patch releases
  • Will now generate proper release notes from commit messages

2. .claude/agents/git-pr-manager.md - Enhanced Agent

  • Added special handling for staging→production release PRs
  • Format: chore(release): staging to production - YYYY.MM.DD
  • Includes automatic release detection and note generation
  • Added commit validation rules and examples

3. .husky/commit-msg - Git Hook (NEW)

  • Validates all commits follow conventional format
  • Blocks invalid commit messages with helpful error messages
  • Provides examples of correct format

Commit Format

Going forward, all commits must follow:

type(scope): description

Types: feat, fix, chore, docs, refactor, test, style, perf, ci, build, revert

Examples:

  • feat(chat): add file upload support → Minor release
  • fix(api): resolve race condition → Patch release
  • chore(release): staging to production - 2025.11.03 → Patch release with full notes

Testing

✅ Validated commit-msg hook accepts valid conventional commits
✅ Validated commit-msg hook rejects invalid formats
✅ Tested release commit format: chore(release): ...

Impact

  • Next release will have proper release notes with Features/Bug Fixes sections
  • All future commits will be validated before being created
  • Release automation fully restored with comprehensive release notes

Related

Fixes the issue identified in PR #655 where release v1.7.2 had empty notes.

Configure semantic-release with conventionalcommits preset to fix
empty release notes. Added commit-msg hook to enforce format.
@vercel

vercel Bot commented Nov 3, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
answerai-docs Building Building Preview Nov 3, 2025 3:54pm
the-answerai Building Building Preview Nov 3, 2025 3:54pm

@maxtechera
maxtechera merged commit d8e8012 into staging Nov 3, 2025
3 of 6 checks passed
@maxtechera
maxtechera deleted the fix/release-automation-conventional-commits branch November 3, 2025 15:54
maxtechera added a commit that referenced this pull request Nov 3, 2025
## Release Summary
This release includes critical fixes to the release automation system,
establishing conventional commit validation.

**Note:** This is the first release using the new conventional commit
format with automated validation via commitlint.

## Changes Included

### Bug Fixes
- **fix(release)**: Add conventional commits to semantic-release (#656)
  - Implemented commitlint with conventional commit validation
  - Added pre-commit hook for commit message linting
  - Updated semantic-release config to generate proper release notes
  - Ensures all future commits follow conventional format

## Release Details
- **Source Branch**: staging
- **Target Branch**: production
- **Release Date**: 2025.11.03
- **Semantic Release**: Will auto-generate version based on conventional
commits

## Testing
- Commitlint validation tested and working
- Pre-commit hooks validated
- Semantic-release configuration verified

## Deployment Notes
- No database migrations required
- No manual steps needed
- Semantic-release will automatically create GitHub release with notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant