-
Notifications
You must be signed in to change notification settings - Fork 408
How to contribute
There is several way to contribute to Leshan like :
- test and report bugs,
- share your needs/experiences in github issues or on the mailing list,
- enhance documentation,
- contribute code by sending github pull-request.
In this guide we will focus on code contribution.
Here we consider that you already played with Leshan, if this is not the case please have a look to our Getting-started.
Before to propose code, you should consider to open a github issue to discuss about your changes with the community.
Code contribution is done via github pull-request, so if you're not so familiar with that, you can have a look to this guide.
Apologies in advance for the extra work required here. This is necessary to comply with the Eclipse Foundation's strict IP policy.
In order for any contributions to be accepted you MUST do the following things.
- Sign the Eclipse Contributor Agreement.
To sign the Eclipse ECA you need to:
- Create an eclipse account if you don't already have one. Anyone who currently uses Eclipse Bugzilla or Gerrit systems already has one of those. If you don’t, you need to register.
- Login to sign ECA, select the “Contributor License Agreement” tab.
- Add your github username in your Eclipse Foundation account settings. Log in it to Eclipse and go to account settings.
For more details, you can read the eclipse contribution guide.
First step, you need to fork the leshan repository, clicking Fork
button on top-right corner of the page. For more details about forking.
Now get the code locally,
git clone git@github.com:YourGithubId/leshan.git
then build leshan,
mvn clean install
then create a new branch for your feature.
git checkout -b yourBranchName
We strongly advice you to read our Code-&-design-guidelines.
You should also have a look to the description of each Leshan modules.
You are now reading to modify Leshan !
Before to share your work, you should consider to run automatic tests using :
mvn clean install
If you have a Redis instance available, you can also test our redis store implementation using :
# run test with default Redis URI : redis://localhost:6379
mvn clean install -Predis
# you can use the REDIS_URI environment variable to change the URI
# using this format : redis://:password@hostname:port/db_number
You should also consider to write some JUnit tests.
Commit your changes in your feature branches (do not forgot to sign it), then push it to your remote fork.
Now you need to send a pull-request. :warning: Do not use this branch for any other development, otherwise further changes that you make will be visible in the PR.
Committers/Users will review it and give you some feedbacks.
You should also review it yourself to be sure this is readable for committers. If this is not, don't wait for comment and fix it.
To fix your code, no need to create a new PR.
Just modify your works in the same git branch then push it again.
You can even rewrite your git history if you want using rebase and push --force :
All contributions you make to our web site (including this wiki) are governed by our Terms of Use, so please take the time to actually read it. Your interactions with the Eclipse Foundation web properties and any information you may provide us about yourself are governed by our Privacy Policy.