Here at Sparked, we use Springloops to host our code, and Pivotal Tracker to manage our code sprints. In order to keep things organized, we have a simple commit message convention: with our commit message, we include a link to the corresponding Pivotal Tracker story. We then copy/paste the link to our commit on springloops into a comment on the corresponding story.
What’s great about this workflow is that it allows us to look back and cross reference our commits with their corresponding Pivotal Tracker stories and vice-versa. What’s not so great about this workflow is that it takes time to copy and paste the link to the commit into Pivotal, especially when there are many commits that cover the same story, often leading us to forget to link all of our commits to the stories that they cover. Very roughly, and especially on high-commit days, it takes us ~20 minutes per day to make sure that all of the cross linking is done correctly.
In order to solve this, we built a light Springloops and Pivotal Tracker Integration module to use the Springloops post-commit webhook to hit the great source_commits API endpoint provided by Pivotal Tracker, which automatically posts the commit message with a link to the commit when there is a reference to a story in the commit message. Since the source_commits endpoint requires that the reference to the story is in the
[#<story_id>] format, our module will format the links that we post in the form of
https://www.pivotaltracker.com/story/show/<story_id> into the required format, while still preserving the existing bracket functionality.
Our module is wrapped by a simple Flask app, which can be easily deployed using Heroku. Alternatively, if your application is running python, you can run the module with the simple lines (where request.form is a dictionary of the form data delivered by the springloops post-commit webhook):
import pusher result = pusher.pushToPivotal(request.form)