Thomas Fuchs
Hi, I'm Thomas Fuchs. I'm the author of the script.aculo.us user interface JavaScript library, a member of the Prototype core team and a Ruby on Rails core alumnus. You're using my work every day, even if you're not aware of it (sounds creepy, I know!). Need JS foo? Hire me.

Instant Time Tracking from Git commit messages

October 12th, 2009 by Thomas Fuchs, 7 comments »

We just launched something really awesome that just might change your way you think time tracking can be done. Personally, I think this is super-fricking-amazingly-awesome, not having to go through a GUI at all for tracking time, rather just adding a little bit of functionality to stuff you already do anyway.

So Freckle Time Tracking now comes with Github integration, which means you can instantly log time from Git commit messages when you push updates to Github.

Here’s how it works:

Log 15 minutes:

git commit -m "Remove some extra whitespace f:15"

Log 2 hours, 30 minutes:

git commit -m "reporting, add CSV export f:2.5"

When you git push to your freckle-enabled Github repository, Github will automatically contact freckle and log time for all commits that come with the “f:time” bit.

To set this up, first grab your freckle API token. This API key is available in freckle under “Settings & Tools” in the Integration (API) tab. You’ll need this API token in the next step, configuring your Github project– in your Github Project admin section, go to “Service Hooks” and select “freckle”, then fill in your freckle subdomain, the API token you just grabbed and then the Freckle project name you want to log time for in this Github project.

Link back to Github

Once you’ve set this up, you can log time from your commits! freckle even links back to Github, to each individual commit (the little “github.com” link after the commit message). Users are mapped with their email addresses, so these need to be the same in both Github and freckle.

Screen shot 2009-10-12 at 19.53.28

Which also means that you save a minute or so that you’d need to open up the freckle web app or timer every time you do this, and rather spend the time on doing what you love, coding and creating stuff.

Post to Twitter Tweet This Post Post to Digg Digg This Post Post to Facebook Share on Facebook

7 comments »

JavaScript Rocks! Peformance ebook
Do you run a web site or web application? Do your users a favor, and grab our ebook on JavaScript performance. Profit from our knowledge gathered in over 15 years of working with the Web and JavaScript and make your sites ultra-fast and your users ultra-happy.

7 Comments on “Instant Time Tracking from Git commit messages”

  1. 1 Colin Barrett said at 8:24 pm on October 12th, 2009:

    Cool!! Is there any way to add tags from the commit message? ;)

  2. 2 Thomas Fuchs said at 8:27 pm on October 12th, 2009:

    @Colin Yeah, just use the usual freckle syntax. If you do -m “blah, blech, something much longer f:15″ it will auto-create “blah” and “blech” tags and use “something much longer” as description!

  3. 3 Zeno said at 11:27 pm on October 12th, 2009:

    Very, very cool!

    thx!

    PS: How difficult it would be to make it work on any GIT repository (not only Github’s repositories)?

  4. 4 Thomas Fuchs said at 8:56 am on October 13th, 2009:

    @Zeno freckle has a full-blown API, so you can use Git’s post-update hook facilities to do just that. If you come up with something, please share! :)

  5. 5 Todd Little said at 5:23 pm on October 13th, 2009:

    My group has been using 14dayz to track time, but this could be the deal breaker needed to get us to switch. Great work.

  6. 6 André Luís said at 12:50 pm on January 14th, 2010:

    Thomas, are you familiar with any hosted svn service that integrates with freckle like github?

    (And yes, i take it from your comment i could use svn post commit hooks to use the freckle api… but I’m lazy today.)

  7. 7 Thomas Fuchs said at 1:09 pm on January 14th, 2010:

    @Andre: Yes, http://beanstalkapp.com/ has freckle integration!


Leave a Reply