The process of getting your code reviewed in an open source environment isn’t easy, and it could take some time for it to get merged, especially if it’s a large project that has large community. On today’s blog, I will go through the process of how codes gets reviewed and eventually merged. The 2 open source software’s I chose as an example are Nmap and Wireshark. These projects have different ways to contribute. You can contribute to Nmap through GitHub and for Wireshark you can use their own website. Likewise, I will explain their functionality, license details and examples on how to submit a your code if you are interested in contributing for either of the projects.
Nmap is used to discover computer hosts and services on a computer network, it enables you to fetch and view some useful details about them such as subnet IP, type of OS, available ports and many more. Nmap is under the GPL v2 license, which basically means you can use it for commercial use, modify the code, distribute. Each modification is being made to the software the user must state the changes on a separate file and include the original software, if you are interested about the GPL v2 license you may read more about it on the link down below.,
As I’ve mentioned that Nmap is an open source project, it allows you to send PR trough GitHub but interesting enough the developers do not merge directly your pull-request from there. Once a PR is being made, it must undergo multiple check test; it will test on Travis CI which has automated build test and it will check if the code is compatible with the project and haven’t broken anything else. Once this is complete the user must send an email to the developers (email can be found on the contribution page) and state that they have created a PR and write a short description of the fix. After this is done the developer(s) will review the PR, if this gets accepted they will convert the user PR into a patch and apply it to the subversion repository (basically this means the PR is being merged).
Now I will go through the process of how to submit a PR on GitHub to Nmap project. For the first method, you can fork the project repository from GitHub and use GIT bash to make the change’s (GIT comes in GUI or terminal based) you must be familiar with GIT commands to submit a PR. Alternately you can use the GitHub website to create a PR. Let’s take look at the example of an contributor that has created a PR on GitHub. On Bug 1105 the user has committed the changes and got a reply quickly. The developers are not quiet activate on GitHub, this is why you must send an email notifying about the PR that you have created.
Wireshark enables you to troubleshoot your network, you can also monitor, capture network packets, gather information from network traffic this can be used for good and bad (hacking). Like the license above, the only difference here that you do not have to state the changes that you have made to the project source code. I have inserted the link down below if you are interested on reading further regarding this license.
Wireshark has their own GitHub repository page, but you cannot submit a PR there, as they have their own website to review the code. To create a patch, you must first register on their website and read their documentation, which is very detailed and easy to follow. Let’s take a look how the code is being reviewed for Wireshark. On Patch 25374 the user created a fix for a specific bug on a separate branch, we can see the name of the reviewer and that this has been merged. I notice that the developers are active, and each fix gets relatively quick replies from them.