Note: This was originally posted to the Dynamo Blog.
This month’s Dynamo Developer Challenge has been inspired by our own Daniel Wright—more about that in the moment.
In a nutshell, for the month of April we will be experimenting across the studio with using Pull Requests to develop a new features. We are moving beyond simply using them as a Code Review tool, as we have in a past challenge.
Over the last few months, Daniel has been religiously using Pull Requests to push new features. As I’m a bit of GitHub stalker I love seeing this, as it gives me a chance to provide feedback on commits and putting Code Reviews into practice. However, these Pull Requests were created once the feature was deemed “done.”
After viewing Zach Holman’s slides from a talk titled GitHub: Behind the Feature, Daniel began creating Pull Requests at the start of a new feature. And I’ve been impressed by what I have seen so far! But I don’t want to get a head of myself; I’ll share some observations at the end of this challenge.
So, how does this all work?
Here’s some steps, based on the write-up Daniel did for his current project:
- Choose a feature to implement, and create a new Git feature branch for it.
- Once you’ve selected your feature to work on, you’d create a new branch for it:
git checkout -b features/your-new-feature
- Now do a very small amount of work, just enough that you can commit it. For example, you might create the view-template you’re going to use (e.g.
app/views/pages/about.html.haml
). - Now commit it!
git add . && git commit -m "Adds about page template"
- Push your branch up to GitHub:
git push -u origin HEAD
- Finally, visit the project page on GitHub and create the pull request. Since you just pushed the branch, the project’s landing-page should prompt you to create the pull request. Give it a descriptive title, and describe what you’re planning to accomplish with the PR. For a simple integration job, this should be fairly straightforward, but you can be as descriptive as you like.
- Submit the pull request!
So, the April challenge has been posted for our Dynamo-Devs, but we encourage you to join us too. Are you up for the challenge? Please share you experiences in the comments along with our team’s.
For a little more background on this development strategy, checkout the slides below: