summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir <AntoscencoVladimir@users.noreply.github.com>2023-01-09 21:45:20 +0200
committerGitHub <noreply@github.com>2023-01-09 19:45:20 +0000
commit585084354e7ecf3b93c6eedb2ece70e914ee28b9 (patch)
tree4ec74a19614bc75f29c8411352cdd4808b110a99
parentfc722807f815bd170849f92d215ce2afa62e55b6 (diff)
downloadzsh-585084354e7ecf3b93c6eedb2ece70e914ee28b9.tar.gz
zsh-585084354e7ecf3b93c6eedb2ece70e914ee28b9.tar.bz2
zsh-585084354e7ecf3b93c6eedb2ece70e914ee28b9.zip
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>
-rw-r--r--plugins/jira/README.md1
-rw-r--r--plugins/jira/jira.plugin.zsh7
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/jira/README.md b/plugins/jira/README.md
index a7cfe6d9e..3d6d323a4 100644
--- a/plugins/jira/README.md
+++ b/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 ###
diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
index 0add040d1..71224bdfb 100644
--- a/plugins/jira/jira.plugin.zsh
+++ b/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