docs: recommend semantic commit messages style (#977)

* docs: recommend semantic commit messages style

* docs: nits

* Update CONTRIBUTING.md
This commit is contained in:
Endilie Yacop Sucipto 2018-09-22 11:44:22 +08:00 committed by GitHub
parent ce5610a420
commit 719bc0f370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -96,7 +96,7 @@ If you're only fixing a bug, it's fine to submit a pull request right away but w
### Sending a pull request
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. It is recommended to follow this [commit message style](#semantic-commit-messages).
Please make sure the following is done when submitting a pull request:
@ -155,6 +155,37 @@ The core Docusaurus team will be monitoring for pull requests. Read [what to exp
However, there are still some styles that Prettier cannot pick up.
## Semantic Commit Messages
See how a minor change to your commit message style can make you a better programmer.
Format: `<type>(<scope>): <subject>`
`<scope>` is optional
## Example
```
feat: allow overriding of webpack config
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
```
The various types of commits:
- `feat`: (new feature for the user, not a new feature for build script)
- `fix`: (bug fix for the user, not a fix to a build script)
- `docs`: (changes to the documentation)
- `style`: (formatting, missing semi colons, etc; no production code change)
- `refactor`: (refactoring production code, eg. renaming a variable)
- `test`: (adding missing tests, refactoring tests; no production code change)
- `chore`: (updating grunt tasks etc; no production code change)
Use lower case not title case!
### Code Conventions
#### General