Open Source: Pull Request Driven Development Scott Motte April 8, 2014 Technical // SUMMARIES ?> Pull Requests are my favorite feature of GitHub. They are the way I prefer to do development. Avoid Communication Breakdown There is necessarily a lot of discussion that happens when writing code. On a team of one, this discussion happens in your brain. On a local team of two or three, it happens IRL. These approaches work ok, but they break down when the team is remote or four-plus people. So, how do you avoid this breakdown in communication? Often, teams turn to an external tool like Basecamp. I recommend against that. Those conversations live too far away from where the code lives. Your brain and mouse have to travel between each. The better way is to use GitHub’s Pull Request Feature. Pull Requests put the conversations around your code where they belong–inline with the code. How SendGrid Does It For example, we use pull requests for all our open source libraries. When we want to add a new feature, we issue a pull request, push up code, comment on that code inline, welcome others to leave their comments, and continue to develop it. When it’s ready, we merge it into master. This works great because: The main employees whowork on the open source all live remotely in places like New York, Los Angeles, and San Francisco. It allows non-employees to easily and safely contribute to our open source libraries. It provides an archive for conversations around a particular bug fix or feature addition. How It’s Working Out On the sendgrid-nodejs library we’ve closed 112 pull requests alone. Even on a brand new library like sendgrid-go, we’ve closed nine. Each of them have code and a conversation attached, and many are from non-employees contributing their time and knowledge. We really like when non-employees contribute to our libraries. They catch things that honestly, sometimes we don’t. As a result, we reward them. If you open a pull request for one of SendGrid’s libraries, and we accept it, we mail you an awesome “SendGrid Contributor” badge. These are rare and pretty cool. So I highly recommend using GitHub Pull requests. If you’re not using them for open source, you’re doing it wrong. Open a Pull Request, Get a Shirt If you haven’t ever opened a pull request (or rarely have), I’ve setup the following for you. Startup Shirts. This is not Startup Threads – which is awesome by the way, and you should check out. These are instead, a collection of shirts I happen to gather from my travels and attendance at events. I get them for free usually, and so I’m giving them away to you for free mostly :). All you have to do is open a pull request. Choose your shirt, and follow these instructions. I’ll mail you the shirt at no monetary cost to you. Alright, git pull request-in’. See what I did there?