DEV Community

WH yang
WH yang

Posted on

How to Contribute a Feature to Someone Else's Repository

This week I opened an issue in a classmate's repo to suggest adding a new option to their CLI project. Another classmate did the same for my project. I’m writing this to share the process and what I learned.

I created an issue and said I would add the new option myself. It took me some time to figure out where to change the code. I tried to follow the existing style and avoid breaking anything. Reading and tracing someone else’s project needs patience. While doing that, I noticed a few things I had not been doing correctly in my own code.

After I finished, I tested the new feature and opened a pull request, including my test results. Even though the code worked, I realized I was still missing some documentation. Besides writing code, adding clear comments and instructions is another skill I need to improve.

When I tried to contribute to another project, one of my classmates tried to help me, but at first we couldn’t get the same output as the main branch. I reviewed his changes and pointed out where the inconsistency might come from. He eventually fixed it and added a new feature while keeping the original behavior.

From these two experiences, I learned:

  1. Online collaboration is asynchronous, so I should leave clear messages with references.
  2. There is always room to improve—my project, my code, and my communication.
  3. If I add automated tests, both my classmates and I can save time, because differences in output would show up right away when code is pushed to GitHub.

Top comments (0)