|
| 1 | +# Contributing to the project |
| 2 | + |
| 3 | +:+1::tada: First off, thanks for taking the time to contribute! :tada::+1: |
| 4 | + |
| 5 | +Here are the guidelines we'd like you to follow: |
| 6 | + |
| 7 | +- [Pull Requests](#pullrequest) |
| 8 | +- [Commit Message Guidelines](#commit) |
| 9 | + |
| 10 | +## <a name="pullrequest"></a> Github Pull Requests |
| 11 | + |
| 12 | +QA: Quality Assurance |
| 13 | +PR: Pull Request |
| 14 | +CI: Continuous Integration (Travis) |
| 15 | + |
| 16 | +Here is the workflow for pull requests we are using. |
| 17 | + |
| 18 | +1. Submit your pull request. |
| 19 | + => the CI should kick tests so you will have feedback about the different QA |
| 20 | +2. If any issues are marked on the PR by CI please fix them. No broken PR will be reviewed. |
| 21 | +3. Once the quality checks are OK, and you need your PR to be reviewed you must use the label **Need review**. If your PR is still a work in progress, do not use any label but this means no review will be performed. |
| 22 | +4. The components owners will then identify who is going to do the review and then assign it. The reviewer will recieve an automatic mail notification. |
| 23 | +6. We use the new review system of github so you will know if the reviewer request changes, approve it or just add some comments. |
| 24 | +7. if any changes are requested please fix them and then once you are ready request a new review by ping the reviewer throw github |
| 25 | + |
| 26 | +## <a name="commit"></a> Git Commit Guidelines |
| 27 | + |
| 28 | +We have very precise rules over how our git commit messages can be formatted. This leads to **more |
| 29 | +readable messages** that are easy to follow when looking through the **project history**. |
| 30 | + |
| 31 | +### Commit Message Format |
| 32 | +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special |
| 33 | +format that includes a **type**, a **scope** and a **subject**: |
| 34 | + |
| 35 | +``` |
| 36 | +<type>(<scope>): <subject> |
| 37 | +<BLANK LINE> |
| 38 | +<body> |
| 39 | +<BLANK LINE> |
| 40 | +<footer> |
| 41 | +``` |
| 42 | + |
| 43 | +The **header** is mandatory and the **scope** of the header is optional. |
| 44 | + |
| 45 | +Any line of the commit message cannot be longer 100 characters! This allows the message to be easier |
| 46 | +to read on GitHub as well as in various git tools. |
| 47 | + |
| 48 | +#### Revert |
| 49 | +If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. |
| 50 | +In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. |
| 51 | + |
| 52 | +#### Type |
| 53 | +Must be one of the following: |
| 54 | + |
| 55 | +* **feat**: A new feature |
| 56 | +* **fix**: A bug fix |
| 57 | +* **docs**: Documentation only changes |
| 58 | +* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing |
| 59 | + semi-colons, etc) |
| 60 | +* **refactor**: A code change that neither fixes a bug nor adds a feature |
| 61 | +* **perf**: A code change that improves performance |
| 62 | +* **test**: Adding missing tests |
| 63 | +* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation |
| 64 | + |
| 65 | +#### Scope |
| 66 | +The scope could be anything specifying place of the commit change. Most of the time it shoulb be Jira ticket reference followed by a usefull context. |
| 67 | + |
| 68 | +For example `osmapi`, `oauth`, `overpass`, etc... |
| 69 | + |
| 70 | +#### Subject |
| 71 | +The subject contains succinct description of the change: |
| 72 | + |
| 73 | +* use the imperative, present tense: "change" not "changed" nor "changes" |
| 74 | +* don't capitalize first letter |
| 75 | +* no dot (.) at the end |
| 76 | + |
| 77 | +#### Body |
| 78 | +Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". |
| 79 | +The body should include the motivation for the change and contrast this with previous behavior. |
| 80 | + |
| 81 | +#### Footer |
| 82 | +The footer should contain any information about **Breaking Changes** |
| 83 | + |
| 84 | +**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. |
| 85 | + |
0 commit comments