[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

chore: add commit-convention.md

patak-dev (Jan 4, 2022, 9:48 AM +0100) 08834bf1 fb9d9e93

+92
+92
.github/commit-convention.md
··· 1 + ## Git Commit Message Convention 2 + 3 + > This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). 4 + 5 + #### TL;DR: 6 + 7 + Messages must be matched by the following regex: 8 + 9 + <!-- prettier-ignore --> 10 + ```js 11 + /^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/ 12 + ``` 13 + 14 + #### Examples 15 + 16 + Appears under "Features" header, `dev` subheader: 17 + 18 + ``` 19 + feat(dev): add 'comments' option 20 + ``` 21 + 22 + Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28: 23 + 24 + ``` 25 + fix(dev): fix dev error 26 + 27 + close #28 28 + ``` 29 + 30 + Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation: 31 + 32 + ``` 33 + perf(build): remove 'foo' option 34 + 35 + BREAKING CHANGE: The 'foo' option has been removed. 36 + ``` 37 + 38 + 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. 39 + 40 + ``` 41 + revert: feat(compiler): add 'comments' option 42 + 43 + This reverts commit 667ecc1654a317a13331b17617d973392f415f02. 44 + ``` 45 + 46 + ### Full Message Format 47 + 48 + A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: 49 + 50 + ``` 51 + <type>(<scope>): <subject> 52 + <BLANK LINE> 53 + <body> 54 + <BLANK LINE> 55 + <footer> 56 + ``` 57 + 58 + The **header** is mandatory and the **scope** of the header is optional. 59 + 60 + ### Revert 61 + 62 + If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. 63 + 64 + ### Type 65 + 66 + If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog. 67 + 68 + Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks. 69 + 70 + ### Scope 71 + 72 + The scope could be anything specifying the place of the commit change. For example `dev`, `build`, `workflow`, `cli` etc... 73 + 74 + ### Subject 75 + 76 + The subject contains a succinct description of the change: 77 + 78 + - use the imperative, present tense: "change" not "changed" nor "changes" 79 + - don't capitalize the first letter 80 + - no dot (.) at the end 81 + 82 + ### Body 83 + 84 + Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". 85 + The body should include the motivation for the change and contrast this with previous behavior. 86 + 87 + ### Footer 88 + 89 + The footer should contain any information about **Breaking Changes** and is also the place to 90 + reference GitHub issues that this commit **Closes**. 91 + 92 + **Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.