lighthouse_branch

Installation

sudo gem install lighthouse_branch

Setup

Add your Lighthouse project settings to your repo’s git config.

git config lighthouse.account [lighthouse account subdomain]
git config lighthouse.token [lighthouse API token]
git config lighthouse.project [lighthouse project id]

Usage

If ticket_id is not given, it will be determined by the current branch. This gem also comes with lhb, a shorter version of lh-branch

lh-branch [ticket_id] ([remote_name]): Creates a branch based on the ticket name. If remote_name is given, the branch will be pushed to the remote.

lh-branch 1 #=> git checkout -b 1-ticket-title

lh-branch push [ticket_id] [remote_name]: Pushes the ticket’s branch to the named remote.

lh-branch push 1 origin #=> git push origin 1-ticket-title

lh-branch pull [ticket_id] [remote_name]: Pulls the ticket’s branch from the named remote.

lh-branch pull 1 origin #=> git pull origin 1-ticket-title

lh-branch merge [ticket_id]: Merges the ticket’s branch with the current branch.

lh-branch merge 1 #=> git merge 1-ticket-title

lh-branch checkout [ticket_id]: Checks out the ticket’s branch, making it the current branch.

lh-branch checkout 1 #=> git checkout 1-ticket-title

lh-branch delete [ticket_id] ([remote_name]): Deletes the ticket’s branch. If remote_name is given, the branch will also be deleted on remote.

lh-branch delete 1 #=> git branch -d 1-ticket-title

lh-branch update [ticket_id] [message] ([extra]): Creates a commit that references the ticket Extra is any extra lighthouse commands

lh-branch update 1 "Made some changes" #=> git commit -a -m "Made some changes\n\n[#1 tagged:'branch:1-ticket-title']"

lh-branch resolve [ticket_id] [message]: Creates a commit that will mark the ticket resolved.

lh-branch resolve 1 "Fixed the bug." #=> git commit -a -m "Fixed the bug\n\n[#1 state:resolved]"

Copyright © 2009 Matt Pruitt. See LICENSE for details.