ci: enforce conventional commit format on PR titles#70
Conversation
Adds a GitHub Action that validates PR titles follow conventional commit format (feat:, fix:, docs:, etc.). This ensures squash merges produce commits that semantic-release can analyze for version bumps. Required because semantic-release was skipping releases when commits didn't follow the convention (e.g., PR #66's "fix tests" instead of "fix: tests").
- Update CONTRIBUTING.md to clarify PR titles are validated by CI - Explain squash merge strategy and how it affects releases - Add PR Title Check to CI checks list - Update CLAUDE.md with summary of PR title requirements
|
Claude finished @ian-flores's task —— View job Reviewing PR
Review submitted with feedback on:
Note: I was unable to add inline comments due to permissions, so feedback was included in the review body instead. |
There was a problem hiding this comment.
Review Summary
This PR adds CI enforcement for PR title conventions, which solves a real problem (semantic-release skipping releases due to non-conforming commits). The implementation is solid and follows existing patterns.
What's Good:
- Uses
amannn/action-semantic-pull-request@v5, a well-maintained action for this purpose - Documentation updates in CONTRIBUTING.md are thorough and explain the "why" behind the requirement
- The workflow triggers on appropriate events (
opened, edited, synchronize, reopened) - CLAUDE.md update is appropriately concise
Minor Suggestions:
-
Version pinning (
.github/workflows/pr-title.yml:23): Consider pinning to a specific version (e.g.,@v5.4.2) with Dependabot for updates. This improves security and reproducibility. The@v5pattern is acceptable but less secure. -
Header comment examples (
.github/workflows/pr-title.yml:1-10): The examples in the header are helpful. Consider adding one with a scope, e.g.,fix(api): fix validation bugto show the optional scope syntax.
Checklist:
- Follows existing CI workflow patterns
- Documentation is clear and actionable
- No security concerns with the changes
Note for merging: The PR description mentions enabling "Squash and merge only" in repo settings. Ensure this is done before relying on this enforcement.
Summary
Context
semantic-release was skipping releases because commits weren't following conventional format (e.g., PR #66's "fix tests" instead of "fix: tests").
With this change:
feat:,fix:,docs:, etc.Checklist
.github/workflows/pr-title.yml)Test plan