Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #1335 from paulredmond/plugin/jira

Open Jira issues from a project
  • Loading branch information...
commit 8a8b821aaccac58c61c135322554902203150fc2 2 parents 9ba2ab3 + 9acfaee
Robby Russell authored October 09, 2012

Showing 1 changed file with 22 additions and 0 deletions. Show diff stats Hide diff stats

  1. 22  plugins/jira/jira.plugin.zsh
22  plugins/jira/jira.plugin.zsh
... ...
@@ -0,0 +1,22 @@
  1
+# To use: add a .jira-url file in the base of your project
  2
+# Setup: cd to/my/project
  3
+#        echo "https://name.jira.com" >> .jira-url
  4
+# Usage: jira           # opens a new issue
  5
+#        jira ABC-123   # Opens an existing issue
  6
+open_jira_issue () {
  7
+  if [ ! -f .jira-url ]; then
  8
+    echo "There is no .jira-url file in the current directory..."
  9
+    return 0;
  10
+  else
  11
+    jira_url=$(cat .jira-url);
  12
+    if [ -z "$1" ]; then
  13
+      echo "Opening new issue";
  14
+      `open $jira_url/secure/CreateIssue!default.jspa`;
  15
+    else
  16
+      echo "Opening issue #$1";
  17
+      `open $jira_url/issues/$1`;
  18
+    fi
  19
+  fi
  20
+}
  21
+
  22
+alias jira='open_jira_issue'

0 notes on commit 8a8b821

Please sign in to comment.
Something went wrong with that request. Please try again.