|
| 1 | +# Contributing |
| 2 | + |
| 3 | +We would love for you to contribute to the community app :rocket: |
| 4 | + |
| 5 | + - [Commit Message Guidelines](#commit) |
| 6 | + |
| 7 | + ## <a name="commit"></a> Commit Message Guidelines |
| 8 | + |
| 9 | +We now have very precise rules over how our git commit messages can be formatted. This leads to **more |
| 10 | +readable messages** that are easy to follow when looking through the **project history**. But also, |
| 11 | +we use the git commit messages to **generate the change log**. |
| 12 | + |
| 13 | +### Commit Message Format |
| 14 | +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special |
| 15 | +format that includes a **type**, a **scope** and a **subject**: |
| 16 | + |
| 17 | +``` |
| 18 | +<type>(<scope>): <subject> |
| 19 | +<BLANK LINE> |
| 20 | +<body> |
| 21 | +<BLANK LINE> |
| 22 | +<footer> |
| 23 | +``` |
| 24 | + |
| 25 | +The **header** is mandatory and the **scope** of the header is optional. |
| 26 | + |
| 27 | +Any line of the commit message cannot be longer 100 characters! This allows the message to be easier |
| 28 | +to read on GitHub as well as in various git tools. |
| 29 | + |
| 30 | +### Revert |
| 31 | +If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of |
| 32 | +the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is |
| 33 | +the SHA of the commit being reverted. |
| 34 | + |
| 35 | +### Type |
| 36 | +Must be one of the following: |
| 37 | + |
| 38 | +* **feat**: A new feature |
| 39 | +* **fix**: A bug fix |
| 40 | +* **docs**: Documentation only changes |
| 41 | +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing |
| 42 | + semi-colons, etc) |
| 43 | +* **refactor**: A code change that neither fixes a bug nor adds a feature |
| 44 | +* **perf**: A code change that improves performance |
| 45 | +* **test**: Adding missing tests or correcting existing tests |
| 46 | +* **build**: Changes that affect the build system, CI configuration or external dependencies |
| 47 | + (example scopes: gulp, broccoli, npm) |
| 48 | +* **chore**: Other changes that don't modify `src` or `test` files |
| 49 | +* **release**: Release version commit |
| 50 | + |
| 51 | +### Scope |
| 52 | +The scope could be anything specifying place of the commit change. For example |
| 53 | +`login`, `profile`, `challenge-listing`, `challenge-detail` etc. |
| 54 | + |
| 55 | +### Subject |
| 56 | +The subject contains succinct description of the change: |
| 57 | + |
| 58 | +* use the imperative, present tense: "change" not "changed" nor "changes" |
| 59 | +* don't capitalize first letter |
| 60 | +* no dot (.) at the end |
| 61 | + |
| 62 | +### Body |
| 63 | +Optional. Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". |
| 64 | +The body should include the motivation for the change and contrast this with previous behavior. |
| 65 | + |
| 66 | +### Footer |
| 67 | +Optional. The footer should contain any information about **Breaking Changes** and is also the place to |
| 68 | +reference GitHub issues that this commit **Closes**. |
| 69 | + |
| 70 | +**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. |
| 71 | +The rest of the commit message is then used for this. |
0 commit comments