Advice on how to submit Pull Requests

Karuna Sehgal
Karuna Sehgal
Published in
2 min readMay 9, 2018

As a developer, I love contributing to open source projects through Github. At times the changes I submit can be improving documentation or adding a new feature to a repo. I wanted to share some advice on how to submit Pull Requests.

Making a good Pull Request involves more than writing good code. You may have one or more reviewer(s) involved, who have to review your Pull Request in order to evaluate whether it is a good fit for inclusion in the code base.

A small, focused Pull Request gives you the best chance of having it accepted. Focus on resolving one issue/concern. Just as the Single Responsibility Principle states that a class should have only one responsibility, so should a Pull Request address only a single concern.

Remember more concerns you address in a single Pull Request, the bigger the risk that at least one of them will block acceptance of your contribution. Do only one thing per Pull Request. It also helps you make each Pull Request smaller.

Also you should add the following in a Pull Request:

  • Include a link to feature specification. Usually new features are defined in a format that is linkable to your Pull Request, so including this link will allow reviews to get the full context of the changes made.
  • Summarize the changes requested in the Pull Request description.
  • Add images/screenshots.
  • Write about the approach you have take and why.
  • Include risks and concerns especially if you are not sure if the code you have changed will have repercussions elsewhere in the codebase.

Overall I wanted to share with you with some advice I had about submitting Pull Requests. Thank you for reading this blogpost and I hope you learned something new.

--

--

Karuna Sehgal
Karuna Sehgal

Woman on a mission - to live the best life possible!!