How to contribute in Open Source and creating the right Merge Request.

Hi, the scope of this article is not how to find an issue to contribute but how to make sure you follow the steps that are required. I am writing this because I have seen a lot of people not knowing how to actually create a PR and basic sanity. Let’s see How to contribute in Open Source and creating the right Merge Request.

How to contribute in Open Source and creating the right Merge Request.

How to find an issue to contribute?

Before that let’s talk a bit about how you can find an issue to contribute. You can filter out projects on the basis of your language preference on GitHub. After that, you can start reading about the issues. The issues that you can contribute will be with the tag good-first-issue or documentation. Documentations are a great place to start contributing to open-source software.

Once you find the issue with a good first issue tag, you can comment on it so that maintainers can assign it to your name. This makes sure that not multiple people are working on it. If you started working on it without asking maybe your contribution will not be added because someone else may have contributed to it. Once you have got the assignment of the tasks you can start with the code or documentation.

Next comes the things that you have to follow while creating a Merge Request or Pull Request or MR or PR as people can do it with different names.

So before starting you must have a basic understanding of what is git and GitHub and how you can do different operations. After that you can follow the below steps.

Step 1. Fork the Repository

You need to fork the repository in your own user. This is because not everyone has developer access to the repositories. So you cannot push to the main repository where you want to push your code.

Step 2. Create a new branch

In the repository that you have forked. Clone it in your local system and create a branch with a name that best describes the feature or issue that you are fixing.

Step 3. Make the code or documentation changes.

Now in the new branch, you can make the documentation changes or code changes as required. Always try to follow best practices while making changes in code. Else you may have to go through many iterations of code changes to get them accepted.

Step 4. Write basic tests

Most of the repositories will specify what all you have to do to raise a proper merge request, follow the guide that they have. Writing unit test cases, relevant documentation changes, etc are few basic things.

Step 5. Push the code in your repository and create a pull request.

Once you pushed the code into your repo you can see an option to create a merge request to the main repo. You can then create the Merge request. This merge request will then be reviewed and merged or rejected.

Points to keep in mind while creating a PR

Make sure to write a proper description of what changes you have made and how they will affect the software.

Write basic tests that are specified. You may need to run some commands to make the sanity check in your local and then submit. You can find all these in the contribution guide.
You may have to sign some documentation, like for CNCF you have to do.

Here is a sample PR for you to look at. https://github.com/kubernetes-client/python/pull/779

These are some basic steps that you have to follow to start the contribution to the open-source project. These may differ a bit from project to project in the last few steps.

If you like the article on How to contribute in Open Source please share and subscribe. You can also our youtube channel:

https://www.youtube.com/c/LetUsDevOps


Gaurav Yadav

Gaurav is cloud infrastructure engineer and a full stack web developer and blogger. Sportsperson by heart and loves football. Scale is something he loves to work for and always keen to learn new tech. Experienced with CI/CD, distributed cloud infrastructure, build systems and lot of SRE Stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Are you preparing for DevOps and SRE Interview?

Here is a book for you.


Interview preparation and interview questions for DevOps and SRE






A good reads for last-minute preparations for handling DevOps and SRE interviews at companies like LinkedIn, Visa, Atlassian, etc.