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>
This commit is contained in:
Vladimir 2023-01-09 21:45:20 +02:00 committed by GitHub
parent fc722807f8
commit 585084354e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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 ###

View File

@ -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