diff --git a/.github/COMMIT_CONVENTION.md b/.github/COMMIT_CONVENTION.md index 2297468..147f6cb 100644 --- a/.github/COMMIT_CONVENTION.md +++ b/.github/COMMIT_CONVENTION.md @@ -1,34 +1,102 @@ -# Semantic Commit Messages +## Git Commit Message Convention -See how a minor change to your commit message style can make you a better programmer. +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). -Format: `(): ` +#### TL;DR: -`` is optional +Messages must match the following regex: -## Example +```js +;/^(revert: )?(feat|fix|docs|style|refactor|test|ci|chore)(\(.+\))?: .{1,120}/ +``` + +#### Types + +- `feat` - new functionality. +- `fix` - patching a bug. +- `docs` - documentation and comments. +- `style` - style changes only (not necessarily in css). +- `refactor` - reworking internals without impacting project interface. +- `test` - tests and demo. +- `ci` - deploy and continuous integration. +- `chore` - no significant code changes: code formatting, version changes, tool updates, minor refactorings. + +#### Examples + +Appears under "Features" header, `compiler` subheader: ``` -feat: add hat wobble -^--^ ^------------^ -| | -| +-> Summary in present tense. -| -+-------> Type: chore, docs, feat, fix, refactor, style, or test. +feat(compiler): add 'comments' option +``` + +Appears under "Bug Fixes" header, `model` subheader, with a link to issue #28: + +``` +fix(model): handle events on blur + +close #28 ``` -More Examples: +Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: + +``` +feat(core): improve vdom diffing by removing 'foo' option + +BREAKING CHANGE: The 'foo' option has been removed. +``` + +The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header. + +``` +revert: feat(compiler): add 'comments' option + +This reverts commit 667ecc1654a317a13331b17617d973392f415f02. +``` + +### Full Message Format + +A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: + +``` +(): + + + +