Commit Conventions
We use convention at here
Commit messages must be matched by the following regex
/^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)\(?[a-zA-Z0-9-]{0,20}\)?:\s[a-zA-Z0-9-_#\/\s]{1,49}[a-zA-Z0-9]$/;
Format
<type>(<scope>?): <subject>
-
"type"
must be one of the following typesbuild
: changes that affect the build system or external dependencieschore
: changes that don’t modify the logic or test codeci
: changes to our CI configuration files and scriptsdocs
: documentation only changes (add/update/delete)feat
: to add/update/delete a featurefix
: to fix a normal bug, critical bug (maybe refactor that code)perf
: to improve performancerefactor
: a code change that neither fixes a bug nor adds a featurerevert
: to revert a previous commitstyle
: changes that do not affect the meaning of the code (whitespace, formatting, missing semi-colons, etc.)test
: adding missing tests or correcting existing tests
-
"scope"
(optional)The scope must be noun and it represents the section of the section of the codebase
-
"subject"
The subject contains a short description of the change
- use the imperative, present tense (use “add” instead of “added” or “adds”)
- don’t capitalize the first letter
- no dot (.) at the end
- is one of the following types
- ticket:
<ticket No> <a short description>
- some special tasks (no ticket) such as documentation, building or refactoring the source code:
<a short description>
- ticket:
Example
feat: search customer
feat(auth): add logic api
feat(#1001): login
feat(#1001): add product
refactor: improve type safety
refactor(auth): rename some variables
refactor(#1001): structure shared button
build: add eslint configuration
build(base): add eslint configuration
build(#1001): update unit test configuration
docs: add coding convention
docs(convention): add some docs
docs(#1001): add branch convention
chore: update dependencies
chore: typo
test: shared is-string
test(#1001): shared button
Last updated on