1Contributing to Mosquitto 2========================= 3 4Thank you for your interest in this project. 5 6Project description: 7-------------------- 8 9The Mosquitto project has been created to provide a light weight, open-source 10implementation, of an MQTT broker to allow new, existing, and emerging 11applications for Machine-to-Machine (M2M) and Internet of Things (IoT). 12 13- <https://mosquitto.org/> 14- <https://projects.eclipse.org/projects/iot.mosquitto> 15 16 17Source 18------ 19 20The Mosquitto code is stored in a git repository. 21 22- https://github.com/eclipse/mosquitto 23 24You can contribute bugfixes and new features by sending pull requests through GitHub. 25 26 27## Legal 28 29In order for your contribution to be accepted, it must comply with the Eclipse 30Foundation IP policy. 31 32Please read the [Eclipse Foundation policy on accepting contributions via Git](http://wiki.eclipse.org/Development_Resources/Contributing_via_Git). 33 341. Sign the [Eclipse ECA](http://www.eclipse.org/legal/ECA.php) 35 1. Register for an Eclipse Foundation User ID. You can register [here](https://accounts.eclipse.org/user/register). 36 2. Log into the [Accounts Portal](https://accounts.eclipse.org/), and click on the '[Eclipse Contributor Agreement](https://accounts.eclipse.org/user/eca)' link. 372. Go to your [account settings](https://accounts.eclipse.org/user/edit) and add your GitHub username to your account. 383. Make sure that you _sign-off_ your Git commits in the following format: 39 ``` Signed-off-by: John Smith <johnsmith@nowhere.com> ``` 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"``` 404. 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. 41 42## Contributing a change 43 441. [Fork the repository on GitHub](https://github.com/eclipse/mosquitto/fork) 452. Clone the forked repository onto your computer: ``` git clone 46 https://github.com/<your username>/mosquitto.git ``` 473. If you are adding a new feature, then create a new branch from the latest 48 ```develop``` branch with ```git checkout -b YOUR_BRANCH_NAME 49 origin/develop``` 504. If you are fixing a bug, then create a new branch from the latest 51 ```fixes``` branch with ```git checkout -b YOUR_BRANCH_NAME origin/fixes``` 525. Make your changes 536. Ensure that all new and existing tests pass. 547. Commit the changes into the branch: ``` git commit -s ``` Make sure that 55 your commit message is meaningful and describes your changes correctly. 568. If you have a lot of commits for the change, squash them into a single / few 57 commits. 589. Push the changes in your branch to your forked repository. 5910. Finally, go to 60 [https://github.com/eclipse/mosquitto](https://github.com/eclipse/mosquitto) 61 and create a pull request from your "YOUR_BRANCH_NAME" branch to the 62 ```develop``` or ```fixes``` branch as appropriate to request review and 63 merge of the commits in your pushed branch. 64 65 66What happens next depends on the content of the patch. If it is 100% authored 67by the contributor and is less than 1000 lines (and meets the needs of the 68project), then it can be pulled into the main repository. If not, more steps 69are required. These are detailed in the 70[legal process poster](http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf). 71 72 73 74Contact: 75-------- 76 77Contact the project developers via the project's development 78[mailing list](https://dev.eclipse.org/mailman/listinfo/mosquitto-dev). 79 80Search for bugs: 81---------------- 82 83This project uses [Github](https://github.com/eclipse/mosquitto/issues) 84to track ongoing development and issues. 85 86Create a new bug: 87----------------- 88 89Be sure to search for existing bugs before you create another one. Remember 90that contributions are always welcome! 91 92- [Create new Mosquitto bug](https://github.com/eclipse/mosquitto/issues) 93