|
| 1 | +## How to contribute to diff2html |
| 2 | + |
| 3 | +### Main rules |
| 4 | + |
| 5 | +* Before you open a ticket or send a pull request, [search](https://github.com/rtfpessoa/diff2html/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. |
| 6 | + |
| 7 | +* If you're proposing a new feature, make sure you create an issue to let other contributors know what you are working on. |
| 8 | + |
| 9 | +* Before sending a pull request make sure your code is tested. |
| 10 | + |
| 11 | +* Before sending a pull request for a feature, be sure to run tests with `npm test`. |
| 12 | + |
| 13 | +* Use the same coding style as the rest of the codebase, most of the check can be performed with `npm run style`. |
| 14 | + |
| 15 | +* Use `git rebase` (not `git merge`) to sync your work from time to time with the master branch. |
| 16 | + |
| 17 | +* After creating your pull request make sure the build is passing on [CircleCI](https://circleci.com/gh/rtfpessoa/diff2html) |
| 18 | +and that [Codacy](https://www.codacy.com/app/Codacy/diff2html) is also confident in the code quality. |
| 19 | + |
| 20 | +* In your pull request, do not commit the `dist` or `build` folder if you needed to build the release files. |
| 21 | + |
| 22 | +### Commit Style |
| 23 | + |
| 24 | +Writing good commit logs is important. A commit log should describe what changed and why. |
| 25 | +Follow these guidelines when writing one: |
| 26 | + |
| 27 | +1. The first line should be 50 characters or less and contain a short |
| 28 | + description of the change prefixed with the name of the changed |
| 29 | + subsystem (e.g. "net: add localAddress and localPort to Socket"). |
| 30 | +2. Keep the second line blank. |
| 31 | +3. Wrap all other lines at 72 columns. |
| 32 | + |
| 33 | +A good commit log can look something like this: |
| 34 | + |
| 35 | +``` |
| 36 | +subsystem: explaining the commit in one line |
| 37 | +
|
| 38 | +Body of commit message is a few lines of text, explaining things |
| 39 | +in more detail, possibly giving some background about the issue |
| 40 | +being fixed, etc. etc. |
| 41 | +
|
| 42 | +The body of the commit message can be several paragraphs, and |
| 43 | +please do proper word-wrap and keep columns shorter than about |
| 44 | +72 characters or so. That way `git log` will show things |
| 45 | +nicely even when it is indented. |
| 46 | +``` |
| 47 | + |
| 48 | +### Developer's Certificate of Origin 1.0 |
| 49 | + |
| 50 | +By making a contribution to this project, I certify that: |
| 51 | + |
| 52 | +* (a) The contribution was created in whole or in part by me and I |
| 53 | + have the right to submit it under the open source license indicated |
| 54 | + in the file; or |
| 55 | +* (b) The contribution is based upon previous work that, to the best |
| 56 | + of my knowledge, is covered under an appropriate open source license |
| 57 | + and I have the right under that license to submit that work with |
| 58 | + modifications, whether created in whole or in part by me, under the |
| 59 | + same open source license (unless I am permitted to submit under a |
| 60 | + different license), as indicated in the file; or |
| 61 | +* (c) The contribution was provided directly to me by some other |
| 62 | + person who certified (a), (b) or (c) and I have not modified it. |
0 commit comments