I love the integration between github and lighthouse. (If you're not familiar with this, have a look.) However, I always found myself forgetting which ticket I was working on when writing commit messages. At first, I wrote this script just to add the ticket number in the git commit message, but it quickly evolved to help throughout the workflow.
When starting on a new ticket, this script helps by
- Assigning a ticket to when starting work
- Creating a local branch with an intelligent name
On completion it will
- Set the state of the ticket to a user-defined value (through the git commit msg)
- Clear the active user (also through the git commit msg)
Workflow
Here’s an example of the workflow…
Setup
Install Bugflow
Just grab this script and put it wherever you like. (I prefer ~/bin)
Install Gem
Grab the lighthouse gem from github:
$ gem sources -a http://gems.github.com $ sudo gem install Caged-lighthouse-api
Project Config
Finally, create a file in the root of your project called .bugflow.yml and add the following data:
Also, it’s a good idea to add this file to your .gitignore.
$ echo ".bugflow.yml" >> .gitignore
Happy hacking!
