commit-utils
This repository contains a collection of packages used by Top Hat to enforce our commitlint convention and use it to automatically generate changelogs.
Packages
The following packages are provided:
@tophat/commitlint-config: A config for commitlint that enforces Top Hat's style guide
@tophat/commitizen-adapter: An adapter for commitizen that helps you interactively build semantic commit messages
@tophat/conventional-changelog-config: A preset for conventional-changelog built on Top Hat's style guide
@tophat/commit-utils-core: A package containing code that is shared between all our config packages. This package is meant for internal use only.
Commit Convention
Top Hat uses the following commit types as part of our development flow. Note that some of the commit types are automatically added to the changelog using @tophat/conventional-changelog-config
| Commit Type | Title | Description | Added to changelog? |
|---|---|---|---|
| wip | Work in Progress | Changes that are part of some work in progress | No |
| feat | Features | A new feature | Yes |
| fix | Bug Fixes | A bugfix | Yes |
| cr | Code Reviews | Changes resulting from code review | |
| style | Styles | Changes that don't affect the code's meaning (whitespace, formatting, etc) | No |
| refactor | Code Refactoring | Changes that neither fix a bug nor add a feature | No |
| perf | Performance Improvements | Changes that improve performance | Yes |
| docs | Documentation | Changes to documentation only | No |
| test | Tests | Adding missing tests or correcting existing tests | No |
| revert | Reverts | Reverts a previous commit | Yes |
| build | Builds | Changes that affect the build system or external dependencies | No |
| ci | Continous Integration | Changes to our CI configuration files and scripts | No |
| chore | Chores | Other changes that don't modify src or test files | No |
Contributing
To report bugs, please a create a new issue.
Making changes to the config
This configuration specified in these packages are for Top Hat's open source and internal use, so we generally won't be accepting external contributions.
If you are an external contributor and you have changes that you really feel should be included in our global config, feel free to make a suggestion, but please don't take it personally if we decide not to adopt the rule. These configs are really easy to extend, so feel free to do exactly that with this one and make your own based off of it! You can learn more from the commitlint docs for creating shareable configs.
Making a release
When the build passes on master, you can create a release by using lerna. This will automatically push the git tags and release a new version of the updated packages:
lerna version
Contributors
Thanks goes to these wonderful people (emoji key):
Michael Rose | Tonia Tong | Sanchit Gera | jeremysant | Maryam Pazirandeh |
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
Thanks to Carol Skelly for donating the github organization!
Thanks to Maryam Pazirandeh for the awesome logo!