From: Evan You Date: Fri, 23 Aug 2019 21:22:37 +0000 (-0400) Subject: chore: contribution guide X-Git-Tag: v3.0.0-alpha.0~887 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=549e1e1514fb4f7fe0693031d5e9c5a0dc120d2a;p=thirdparty%2Fvuejs%2Fcore.git chore: contribution guide --- diff --git a/.github/commit-convention.md b/.github/commit-convention.md new file mode 100644 index 0000000000..a8522fa210 --- /dev/null +++ b/.github/commit-convention.md @@ -0,0 +1,91 @@ +## Git Commit Message Convention + +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). + +#### TL;DR: + +Messages must be matched by the following regex: + +``` js +/^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,50}/ +``` + +#### Examples + +Appears under "Features" header, `compiler` subheader: + +``` +feat(compiler): add 'comments' option +``` + +Appears under "Bug Fixes" header, `v-model` subheader, with a link to issue #28: + +``` +fix(v-model): handle events on blur + +close #28 +``` + +Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: + +``` +perf(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**: + +``` +(): + + + +