| 1 | # Contributing to Paho |
| 2 | |
| 3 | Thanks for your interest in this project! |
| 4 | |
| 5 | You can contribute bugfixes and new features by sending pull requests through GitHub. |
| 6 | |
| 7 | ## Legal |
| 8 | |
| 9 | In order for your contribution to be accepted, it must comply with the Eclipse Foundation IP policy. |
| 10 | |
| 11 | Please read the [Eclipse Foundation policy on accepting contributions via Git](http://wiki.eclipse.org/Development_Resources/Contributing_via_Git). |
| 12 | |
| 13 | 1. Sign the [Eclipse CLA](http://www.eclipse.org/legal/CLA.php) |
| 14 | 1. Register for an Eclipse Foundation User ID. You can register [here](https://dev.eclipse.org/site_login/createaccount.php). |
| 15 | 2. Log into the [Projects Portal](https://projects.eclipse.org/), and click on the '[Eclipse CLA](https://projects.eclipse.org/user/sign/cla)' link. |
| 16 | 2. Go to your [account settings](https://dev.eclipse.org/site_login/myaccount.php#open_tab_accountsettings) and add your GitHub username to your account. |
| 17 | 3. Make sure that you _sign-off_ your Git commits in the following format: |
| 18 | ``` Signed-off-by: John Smith ``` This is usually at the bottom of the commit message. You can automate this by adding the '-s' flag when you make the commits. e.g. ```git commit -s -m "Adding a cool feature"``` |
| 19 | 4. Ensure that the email address that you make your commits with is the same one you used to sign up to the Eclipse Foundation website with. |
| 20 | |
| 21 | ## Contributing a change |
| 22 | |
| 23 | ## Contributing a change |
| 24 | |
| 25 | 1. [Fork the repository on GitHub](https://github.com/eclipse/paho.mqtt.javascript/fork) |
| 26 | 2. Clone the forked repository onto your computer: ``` git clone https://github.com//paho.mqtt.javascript.git ``` |
| 27 | 3. Create a new branch from the latest ```develop``` branch with ```git checkout -b YOUR_BRANCH_NAME origin/develop``` |
| 28 | 4. Make your changes |
| 29 | 5. If developing a new feature, make sure to include JUnit tests. |
| 30 | 6. Ensure that all new and existing tests pass. |
| 31 | 7. Commit the changes into the branch: ``` git commit -s ``` Make sure that your commit message is meaningful and describes your changes correctly. |
| 32 | 8. If you have a lot of commits for the change, squash them into a single / few commits. |
| 33 | 9. Push the changes in your branch to your forked repository. |
| 34 | 10. Finally, go to [https://github.com/eclipse/paho.mqtt.javascript](https://github.com/eclipse/paho.mqtt.javascript) and create a pull request from your "YOUR_BRANCH_NAME" branch to the ```develop``` one to request review and merge of the commits in your pushed branch. |
| 35 | |
| 36 | |
| 37 | What happens next depends on the content of the patch. If it is 100% authored |
| 38 | by the contributor and is less than 1000 lines (and meets the needs of the |
| 39 | project), then it can be pulled into the main repository. If not, more steps |
| 40 | are required. These are detailed in the |
| 41 | [legal process poster](http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf). |
| 42 | |
| 43 | |
| 44 | |
| 45 | ## Developer resources: |
| 46 | |
| 47 | |
| 48 | Information regarding source code management, builds, coding standards, and more. |
| 49 | |
| 50 | - [https://projects.eclipse.org/projects/iot.paho/developer](https://projects.eclipse.org/projects/iot.paho/developer) |
| 51 | |
| 52 | Contact: |
| 53 | -------- |
| 54 | |
| 55 | Contact the project developers via the project's development |
| 56 | [mailing list](https://dev.eclipse.org/mailman/listinfo/paho-dev). |
| 57 | |
| 58 | Search for bugs: |
| 59 | ---------------- |
| 60 | |
| 61 | This project uses GitHub Issues here: [github.com/eclipse/paho.mqtt.javascript/issues](https://github.com/eclipse/paho.mqtt.javascript/issues) to track ongoing development and issues. |
| 62 | |
| 63 | Create a new bug: |
| 64 | ----------------- |
| 65 | |
| 66 | Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome! |
| 67 | |
| 68 | - [Create new Paho bug](https://github.com/eclipse/paho.mqtt.javascript/issues/new) |
| 69 | |