The 24 Pull Requests challenge – getting started contributing to open source projects
Throughout December I’ve been taking part in the 24 Pull Requests challenge. The idea is to submit 24 pull requests to open source projects on GitHub during Advent, ie, in the first 24 days of December.
I’ve had my own GitHub account since March this year, where I host all the code for my personal open source projects dating back to 2004! (Previously, I was using SourceForge). For example, my first ever project in 2004 was a blogging script and simple content management system using PHP and MySQL. Until now however, I’d never had the confidence to contribute to anyone else’s projects, even though I was interested in doing so. The main reasons why I’d never contributed to anyone’s projects in the past were that I feared I wouldn’t be good enough to contribute, that it would be too difficult and that it would take up too much of my time to do it justice (especially considering I work full time and have a busy social life).
So when I heard about the 24 Pull Requests challenge via Twitter just a few days before the beginning of December, I checked out the website and decided that this would be my ideal opportunity to get started on contributing to open source projects. Although I was still feeling daunted by the size of the challenge, I decided to sign up straight away as I knew it would be a good opportunity and I had nothing to lose. I knew that in order to succeed at the challenge, I’d need to submit an average of one pull request per day.
In the run-up to December, I tried searching for potential projects on GitHub, and I also consulted the list of recommended projects on the 24 Pull Requests website itself. I looked in the Issues section of each repository to see if there were any easy bugs I could fix, but I couldn’t find any that I felt confident about solving. At that point, I was wondering if I’d even manage to submit one pull request throughout the 24 days!
Then I came to the realisation that not every pull request has to be a major change. Even small fixes and contributing to documentation could count as well. In fact, I made my first pull request a couple of days before the contest actually started. Although I knew it wouldn’t count towards the 24 pull requests, I thought it would be useful to learn how the process works – like a dry run to build my confidence. There are 3 main steps involved in submitting a pull request: Fork, commit, pull request. So, my first pull request was an addition to the readme documentation for the 24 Pull Requests project itself. I wrote instructions on how to install the PostgreSQL database on Linux and Windows (I’m familiar with both operating systems). The pull request was accepted by Andrew Nesbitt, the organiser of 24 Pull Requests, just a few hours later. I was so pleased – my first ever pull request had been accepted! It felt like a big milestone for me, and also gave me more confidence for the days ahead. 🙂
One of my favourite pull requests involved adjusting the CSS for a technology blog called dev-human. I improved the appearance of the logo and header when the site is viewed on mobile devices (it is a responsive website using media queries). Some of my other pull requests were for more minor issues, such as typos, grammar and formatting, and there were also days when I struggled to find any suitable projects, but I’m pleased that I did manage to keep up with completing at least one pull request per day.
I found that some pull requests get merged (accepted into the upstream project) almost straight away, which is a good thing, but others are still languishing unaccepted. Hopefully it just means that the project maintainers haven’t had a chance to review them yet, or unfortunately it could mean that these particular projects have been abandoned. Either way, every pull request still counts towards the 24, whether it’s accepted by the project maintainer or not. None of my pull requests were rejected, so that’s a plus!
By Monday this week – 2 days ahead of the deadline – I had completed 26 pull requests. You can see my calendar of contributions here. I feel pleased with this, especially considering at the start I was doubting if I’d even manage to submit one!
Overall, I really enjoyed taking part in the challenge, and I now feel much more confident about contributing to open source projects. Hopefully in the New Year I’ll be able to continue contributing to some of the interesting projects I discovered. The 24 Pull Requests contest has been taking place for the last couple of years and is now an annual event, so if you’re thinking of taking part next year I’d definitely recommend it.