From 3b9f4a86145795c3555638bcb19afff37d522491 Mon Sep 17 00:00:00 2001 From: Jeffrey Duroyon Date: Tue, 14 Jan 2020 00:32:08 +0100 Subject: [PATCH] doc: add commiting convention --- .github/COMMIT_CONVENTION.md | 91 ++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 .github/COMMIT_CONVENTION.md diff --git a/.github/COMMIT_CONVENTION.md b/.github/COMMIT_CONVENTION.md new file mode 100644 index 0000000..3a8b12d --- /dev/null +++ b/.github/COMMIT_CONVENTION.md @@ -0,0 +1,91 @@ +## Git Commit Message Convention + +> This is a copy paste from [Vuejs's commit convention](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md). + +#### TL;DR: + +Messages must be matched by the following regex: + +``` js +/^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{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**: + +``` +(): + + + +