Repository navigation
chore(ci): enforce conventional commits with scopes - #133
Merged
Merged
Conversation
CONTRIBUTING only said use Conventional Commits without format, scopes, or atomic-commit guidance, which led to vague messages like fix: icons problem and god commits mixing fixes with releases. Document the required type(scope) format, monorepo scopes, imperative mood, good examples, and anti-patterns so future commits stay searchable and revert-safe.
Bad messages like fix: icons problem slipped through because husky only ran lint-staged. Add a commit-msg guard requiring type(scope): subject, with the monorepo scopes, so vague and scope-less commits fail fast with a helpful example.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Owner
Author
|
LGTM. |
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
CONTRIBUTING only said "use Conventional Commits" with no format, scopes, or atomic-commit rule. That led to vague history like
fix: icons problemand god-commits mixing fixes + releases.This PR makes the rule explicit and enforced:
CONTRIBUTING.md— requiredtype(scope): subject, monorepo scopes, imperative mood, good vs bad examples from our own history.husky/commit-msg— rejects scope-less/vague messages with a helpful errorTesting
fix: icons problem-> rejected (exit 1)fix(core): align button icon and text-> accepted (exit 0)git log --oneline -3shows 2 atomic commits, one WHY eachChecklist (from your PR template)
CONTRIBUTING.md)Related
Demo for clean-history mentoring — no issue to close. Follow-up could add
commitlintif we want richer linting later.