2ecc228b2325bf5fadb5c12a5ffff73167e53152

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Adding a function that will open up a ticket in Lighthouse based on the number and there being a URL in a hidden file.

Diff

 1diff --git a/lib/functions.zsh b/lib/functions.zsh
 2index 2fb096dd60607570d8440d0ff13b2d733c0de97a..f95a598273e408f27370a4ce314f637eca3728db 100644
 3--- a/lib/functions.zsh
 4+++ b/lib/functions.zsh
 5@@ -58,3 +58,20 @@ function tm() {
 6   cd $1
 7   mate $1
 8 }
 9+
10+# To use: add a .lighthouse file into your directory with the URL to the
11+# individual project. For example:
12+# https://rails.lighthouseapp.com/projects/8994
13+# Example usage: http://screencast.com/t/ZDgwNDUwNT
14+open_lighthouse_ticket () {
15+  if [ ! -f .lighthouse-url ]; then
16+    echo "There is no .lighthouse file in the current directory..."
17+    return 0;
18+  else
19+    lighthouse_url=$(cat .lighthouse-url);
20+    echo "Opening ticket #$1";
21+    `open $lighthouse_url/tickets/$1`;
22+  fi
23+}
24+
25+alias lho='open_lighthouse_ticket'