|
| 1 | +# How to contribute |
| 2 | + |
| 3 | +Third-party patches are essential for keeping Light Java great. We simply can't |
| 4 | +access the huge number of platforms and myriad configurations for running |
| 5 | +Light Java. We want to keep it as easy as possible to contribute changes that |
| 6 | +get things working in your environment. There are a few guidelines that we |
| 7 | +need contributors to follow so that we can have a chance of keeping on |
| 8 | +top of things. |
| 9 | + |
| 10 | +## Core vs Modules |
| 11 | + |
| 12 | +New functionality is typically directed toward middleware components to provide |
| 13 | +a slimmer Framework Core, reducing its surface area, and to allow greater freedom for |
| 14 | +middleware developers and maintainers. |
| 15 | + |
| 16 | +If you are unsure of whether your contribution should be implemented as a |
| 17 | +middleware component or part of Framework Core, you may visit |
| 18 | +[Gitter Chat](https://gitter.im/networknt/light-java) for advice. |
| 19 | + |
| 20 | +## Getting Started |
| 21 | + |
| 22 | +* Make sure you have a [GitHub account](https://github.com/signup/free) |
| 23 | +* Submit a ticket for your issue, assuming one does not already exist. |
| 24 | + * Clearly describe the issue including steps to reproduce when it is a bug. |
| 25 | + * Make sure you fill in the earliest version that you know has the issue. |
| 26 | +* Fork the repository on GitHub |
| 27 | + |
| 28 | +## Making Changes |
| 29 | + |
| 30 | +* Create a topic branch from where you want to base your work. |
| 31 | + * This is usually the master branch. |
| 32 | + * Only target release branches if you are certain your fix must be on that |
| 33 | + branch. |
| 34 | + * To quickly create a topic branch based on master; `git checkout -b |
| 35 | + fix/master/my_contribution master`. Please avoid working directly on the |
| 36 | + `master` branch. |
| 37 | +* Make commits of logical units. |
| 38 | +* Check for unnecessary whitespace with `git diff --check` before committing. |
| 39 | +* Make sure your commit messages are in the proper format. |
| 40 | +* Make sure you have added the necessary tests for your changes. |
| 41 | +* Run all the tests to assure nothing else was accidentally broken. |
| 42 | + |
| 43 | +## Making Trivial Changes |
| 44 | + |
| 45 | +### Documentation |
| 46 | + |
| 47 | +For changes of a trivial nature to comments and documentation, it is not |
| 48 | +necessary to create a new issue. |
| 49 | + |
| 50 | +### Example |
| 51 | + |
| 52 | +Adding new examples or enhance examples won't need to create a new issue. |
| 53 | + |
| 54 | + |
| 55 | +## Submitting Changes |
| 56 | + |
| 57 | +* Push your changes to a topic branch in your fork of the repository. |
| 58 | +* Submit a pull request to the repository in the networknt organization. |
| 59 | +* The core team looks at Pull Requests on a regular basis and will merge the pull request. |
| 60 | +* Sometimes, we might need to contact contributor understand the details of the pull request. |
| 61 | + |
| 62 | +# Additional Resources |
| 63 | + |
| 64 | +* [General GitHub documentation](https://help.github.com/) |
| 65 | +* [GitHub pull request documentation](https://help.github.com/send-pull-requests/) |
| 66 | +* [Light Java Document](https://networknt.github.io/light-java/) |
| 67 | +* [Light Java Gitter](https://gitter.im/networknt/light-java) |
0 commit comments