- Kevin McKee
Last night I gave a talk at the LaravelSTL meetup (which I co-organize with my friend Patrick Stephan) on how to contribute to open source.
I remember when I first started doing software development and I thought I'd like to contribute to open source but had no idea what to do.
I tried to jump right into submitting a PR. I found an issue in the Spatie Geocoder package I was using that I needed to be solved.
I needed this functionality, so even though I had no idea how to contribute to an open source package, I fumbled my way through addressing the issue.
I was making changes in the vendor directory of my project and then copy / pasting my changes to the Github UI to submit the PR. (note: I don't recommend this approach 🤣)
It took me a really long time to create that PR, most of it to create a config variable to turn this feature on and off.
After I submitted it, here was the response:
Ugh! I spent all this time creating the config and the maintainer asked me to remove it. Frustrated, I just started using my fork in production and never resubmitted the PR.
Eventually someone else PRed the changes without the config and it was merged.
This was a very frustrating start to my open source contribution experience, and it's because I missed a crucial first step.
Communicate with the Maintainer
I submitted this PR based off a one sentence issue in the Github repo. I assumed that was enough information to go spend hours working on something. I never once reached out to the maintainer before putting in all this work.
The result? My vision was not aligned with the maintainer's and my PR was rejected.
I could have saved myself a lot of time and trouble by confirming what the maintainer wanted before doing the work.
Open an issue or comment on an existing issue. Reach out on twitter. Send an email. Find the maintainer on a Slack or Discord.
Most will be happy to help new people get involved with open source and you'll know you're now wasting your time.
Want to talk about this post? Connect with me on Twitter →