When you find a bug in an open source project, you know exactly the change you want to make. Other times you just want to find a way to contribute. Either way, you’ll need to know how the project maintainers want to run the project and work with them to come up with an implementation for the fix/feature. And if you don't even know what project to start contributing to, check out this blogpost for inspiration on how to identify a good project to contribute to.
Sometimes you know exactly how you want to contribute because you're looking to fix a bug or add a feature to a specific project. Other times you don't even know what project to contribute to, let alone what to contribute.
I recommend you check our my blog post to help you determine which open source project to contribute to. You can find it by going to kcd.im/what-oss. This will take you to my blog post to answer the question, "What open source project should I contribute to?"
Once you have identified the project that you want to contribute to, then you need to explore the project a little bit. In this series, the project that we're going to contribute to is stack-overflow-copy-paste.
One of the first things you want to look for is a contributing.md file. We have one here. This file will tell you how the maintainers of the project want to handle contributions and also often contains instructions for setting up the project.
If one does not exist you may find this information in the read.me or wiki. If none of that information exists, file an issue and request it.
We'll explore this particular contributing file a little bit later when we actually get to the contribution.
Next, if you're unsure what you would like to do, search the issues. All GitHub projects have a help wanted label that maintainers can use to assign to issues they would like help on. Some projects add other labels to issues.
Look at the issues and labels. In this particular project, we see that there are three issues. Two of them have the help wanted label. If we open up the padLeft needed, it's apparent that this project owner really, really wants to have a padLeft function here. Maybe this is something that we could work on.
Once you've found an issue you want to work on for filed one yourself, ask in the comments if there's a way you can help out. If you're new, let the project maintainer know and ask if they can help you get your first pull request into the project.
It's important that you come up with the basic idea of the solution with the project maintainer before you start working on the solution. You don't want to spend hours working on a feature just to realize the maintainer won't accept it.
Great. You and the project maintainer agree that it's absolutely necessary to have this padLeft implementation from stack overflow. Now we can start implementing this feature.