Browse code

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

Robby Russell authored on 16/12/2009 at 19:23:41
Showing 1 changed files
... ...
@@ -58,3 +58,20 @@ function tm() {
58 58
   cd $1
59 59
   mate $1
60 60
 }
61
+
62
+# To use: add a .lighthouse file into your directory with the URL to the
63
+# individual project. For example:
64
+# https://rails.lighthouseapp.com/projects/8994
65
+# Example usage: http://screencast.com/t/ZDgwNDUwNT
66
+open_lighthouse_ticket () {
67
+  if [ ! -f .lighthouse-url ]; then
68
+    echo "There is no .lighthouse file in the current directory..."
69
+    return 0;
70
+  else
71
+    lighthouse_url=$(cat .lighthouse-url);
72
+    echo "Opening ticket #$1";
73
+    `open $lighthouse_url/tickets/$1`;
74
+  fi
75
+}
76
+
77
+alias lho='open_lighthouse_ticket'