Building a community around a new open source project is a tall order. Immediate feedback is critical when a collaborating developer opens a pull request on your GitHub project. One key component to a healthy repository community I’ve learned over the past year is to comment on and merge pull requests as soon as they are opened.
The short feedback loop allows other developers to feel like their time was well spent by contributing to the open source project. However I found that I rarely saw the GitHub web notification option and often did not immediately check my email when a notification message hit my inbox.
What’s needed for creating a short feedback cycle is a text message notification option on new issues and pull requests. By combining Zapier with Twilio we can set up text message notifications on GitHub pull requests without having to write any new code. This post will show you how to sign up for Twilio and connect GitHub to Twilio using Zapier.
Signing up for Twilio to Send Text Messages
Before we can output text message alerts when Zapier receives a service hook request from GitHub, you’ll need to sign up for Twilio, purchase a phone number and grab your account credentials from the account details page. If you already have a Twilio account with a phone number you can skip on to the next section.
First sign-up for a free Twilio account.
After signing up Twilio needs to quickly verify you’re a human and not a malicious spam bot by either sending you a text message or giving you a voice call.
If you choose the text message verification you’ll receive a message like this one to enter into the sign-up form.
Twilio will assign a random phone number once the sign-up process is complete. You can also search for another number through the Twilio web interface or purchase one programmatically through the API.
Answers to further phone number questions can be found on the phone number FAQ page.
Setting up a Zap with Zapier
With your new Twilio number we can now set up a new Zap in Zapier. Start by creating a new Zap by clicking on the “Make a New Zap” button.
Zapier will bring up the “Choose a trigger and action” page.
Choose GitHub on the left side. Select the “New Pull Request” trigger for GitHub. Don’t worry about selecting a repository yet. We’ll get to that in a few steps.
On the right side choose Twilio. You can have Zapier call you when the GitHub trigger is fired, but SMS is more useful in this case.
The next section allows you to test that the GitHub pull request trigger and Twilio send SMS action are working properly.
We’re almost done. The next step is a filter so that the trigger fires on a specific repository. In this case select your own repository or one from a GitHub organization where you’re a member.
Finally, select the Twilio “From Number” you want to receive the SMS from. Zapier will pre-populate the numbers so you won’t have to look it up in the Twilio numbers page. Enter your “To Number” and a custom message.
You can add fields to the custom message such as the pull request title so you have additional context when you get the messages. If an SMS is longer than 160 characters you have the option to split the message across multiple SMS. I keep the message content short and select yes to this field so the message is not truncated.
That’s all the set up required! Hit continue and you’re all set to receive an SMS whenever a new pull request is opened.
Pull Request Notifications by SMS
Whenever there’s a new pull request made, you’ll now receive the following SMS text so you can immediately review the code and merge it or start a conversation in the comments.
Short response times are a great way to create a community around your project and keep potential collaborators engaged.