Skip to content

chore(release): staging to production - 2025.11.03 - #657

Merged
maxtechera merged 1 commit into
productionfrom
staging
Nov 3, 2025
Merged

chore(release): staging to production - 2025.11.03#657
maxtechera merged 1 commit into
productionfrom
staging

Conversation

@maxtechera

Copy link
Copy Markdown
Collaborator

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 (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

## 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.
@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 Ready Ready Preview Nov 3, 2025 3:56pm
the-answerai Building Building Preview Nov 3, 2025 3:56pm

@maxtechera
maxtechera merged commit bbb731b into production Nov 3, 2025
11 of 12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .husky/commit-msg
Comment on lines +8 to +12
# Conventional commit pattern: type(scope): description
# type: feat, fix, chore, docs, style, refactor, perf, test, build, ci, revert
# scope: optional
# description: required
pattern="^(feat|fix|chore|docs|style|refactor|perf|test|build|ci|revert)(\([a-zA-Z0-9_\-]+\))?: .+$"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow breaking-change ! in commit header regex

The new commit hook enforces a strict type(scope): description regex that omits the optional ! marker used by conventional commits to flag breaking changes. Valid messages such as feat!: drop legacy API or feat(auth)!: remove deprecated endpoint will be rejected, preventing developers from signalling major releases via the header even though semantic‑release (configured with the conventional commits preset) relies on this syntax. Consider updating the pattern to permit ! after the type or scope so breaking changes can still be committed.

Useful? React with 👍 / 👎.

maxtechera added a commit that referenced this pull request Nov 3, 2025
## Release: Staging to Production - November 3, 2025

This release fixes the semantic-release workflow that failed in the
previous merge.

---

## 🔧 Bug Fix

### Missing Dependency in Release Workflow
**Impact:** Fixed semantic-release workflow failure

The previous release PR (#657) merged successfully but the
semantic-release workflow failed with:
```
Cannot find module 'conventional-changelog-conventionalcommits'
```

**Fix Applied:**
- Added `conventional-changelog-conventionalcommits` package to GitHub
Actions workflow
- This package is required by the `conventionalcommits` preset we
configured
- Both `release` and `dry-run` jobs now include the package

---

## 📊 Changes Since Last Production Release

**1 commit:**
- `fix(ci): add conventional-changelog-conventionalcommits to release
workflow`

---

## ✅ Expected Outcome

After merging this PR:
1. semantic-release workflow will run successfully
2. A new GitHub release (v1.7.3) will be created automatically
3. Release notes will be properly generated from conventional commits
4. Future releases will work correctly

---

**Closes:** Workflow failure from PR #657
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