This is adapted from Angular's commit convention.
Messages must be matched by the following regex:
/^(revert: )?(build|ci|docs|feat|fix|perf|refactor|test|types|style)(\(.+\))?: .{1,50}/
A commit message consists of a header, body and footer. The header has a type, scope and subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
<type>(<scope>): <short summary>
│ │ │
│ │ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│ │
│ └─⫸ Commit Scope: |core|resource|spine|dragbone|text|a11y|img|sprite|mask|ninePatch|event|miniprogram|
│
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test|types|style|chore|
The <type>
and <summary>
fields are mandatory, the (<scope>)
field is optional.
- build: Changes that affect the build system or external dependencies
- ci: Changes to our CI configuration files and scripts
- docs: Changes that only affect documentions
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- test: adding missing tests, refactoring tests; no production code change
- types: change only affect TypeScript's types.
- style: formatting, missing semi colons, etc; no code change
Appears under "Features" header, loaders
subheader:
feat(loaders): add 'timeout' option
Appears under "Bug Fixes" header, resource
subheader, with a link to issue #28:
fix(resource): return null when creating a shader while gl context is lost
Closes #28
If the commit reverts a previous commit, it should begin with revert:
, followed by the header of the reverted commit.
The content of the commit message body should contain:
- information about the SHA of the commit being reverted in the following format:
This reverts commit <SHA>
. - a clear description of the reason for reverting the commit message.
Appears under the "Reverts" header:
revert: feat(loaders): add 'timeout' option
This reverts commit 861ffe334f2b16608230b205700683c2f8f5de91.
All breaking changes have to be mentioned in footer with the description of the change.
BREAKING CHANGE:
The `addEventListener` function has changed to `on/once`.