Browse Source

feat(jira): add optional plugin "tempo" path (#11121)

CHANGE: added new environment variable JIRA_TEMPO_PATH to allow set an optional path

Co-authored-by: Vladimir Antoscenco <vladimir.antoscenco@tekoway.com>
Vladimir 1 year ago
parent
commit
585084354e
2 changed files with 7 additions and 1 deletions
  1. 1 0
      plugins/jira/README.md
  2. 6 1
      plugins/jira/jira.plugin.zsh

+ 1 - 0
plugins/jira/README.md

@@ -68,6 +68,7 @@ echo "https://jira.atlassian.com" >> .jira-url
 * `$JIRA_PREFIX` - Prefix added to issue ID arguments
 * `$JIRA_RAPID_BOARD` - Set to `true` if you use Rapid Board
 * `$JIRA_DEFAULT_ACTION` - Action to do when `jira` is called with no arguments; defaults to "new"
+* `$JIRA_TEMPO_PATH` - Your JIRA tempo url path; defaults to "/secure/Tempo.jspa"
 
 
 ### Browser ###

+ 6 - 1
plugins/jira/jira.plugin.zsh

@@ -56,13 +56,18 @@ function jira() {
     fi
   elif [[ "$action" == "tempo" ]]; then
     echo "Opening tempo"
-    open_command "${jira_url}/secure/Tempo.jspa"
+    if [[ -n "$JIRA_TEMPO_PATH" ]]; then
+      open_command "${jira_url}${JIRA_TEMPO_PATH}"
+    else
+      open_command "${jira_url}/secure/Tempo.jspa"
+    fi
   elif [[ "$action" == "dumpconfig" ]]; then
     echo "JIRA_URL=$jira_url"
     echo "JIRA_PREFIX=$jira_prefix"
     echo "JIRA_NAME=$JIRA_NAME"
     echo "JIRA_RAPID_BOARD=$JIRA_RAPID_BOARD"
     echo "JIRA_DEFAULT_ACTION=$JIRA_DEFAULT_ACTION"
+    echo "JIRA_TEMPO_PATH=$JIRA_TEMPO_PATH"
   else
     # Anything that doesn't match a special action is considered an issue name
     # but `branch` is a special case that will parse the current git branch