summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen van der Eerden <15888558+Ken-vdE@users.noreply.github.com>2025-03-20 19:43:08 +0100
committerGitHub <noreply@github.com>2025-03-20 19:43:08 +0100
commit6591606d566cb37d53a7b996f0ff05a59998dc16 (patch)
treeaa55864147acb68f2f37be1ee127a5c510ccf4c9
parentda2510c199edfd3fd28d6297b38ff129b20d3d91 (diff)
downloadzsh-6591606d566cb37d53a7b996f0ff05a59998dc16.tar.gz
zsh-6591606d566cb37d53a7b996f0ff05a59998dc16.tar.bz2
zsh-6591606d566cb37d53a7b996f0ff05a59998dc16.zip
feat(jira): add `project` command to open project (#12851)
-rw-r--r--plugins/jira/README.md1
-rw-r--r--plugins/jira/_jira1
-rw-r--r--plugins/jira/jira.plugin.zsh4
3 files changed, 6 insertions, 0 deletions
diff --git a/plugins/jira/README.md b/plugins/jira/README.md
index 19266e7f0..f6e2e26f4 100644
--- a/plugins/jira/README.md
+++ b/plugins/jira/README.md
@@ -26,6 +26,7 @@ This plugin supplies one command, `jira`, through which all its features are exp
| `jira new` | Opens a new Jira issue dialogue |
| `jira ABC-123` | Opens an existing issue |
| `jira ABC-123 m` | Opens an existing issue for adding a comment |
+| `jira project ABC` | Opens JIRA project summary |
| `jira dashboard [rapid_view]` | Opens your JIRA dashboard |
| `jira mine` | Queries for your own issues |
| `jira tempo` | Opens your JIRA Tempo |
diff --git a/plugins/jira/_jira b/plugins/jira/_jira
index 5f7dcd09d..617a3e501 100644
--- a/plugins/jira/_jira
+++ b/plugins/jira/_jira
@@ -5,6 +5,7 @@ local -a _1st_arguments
_1st_arguments=(
'new:create a new issue'
'mine:open my issues'
+ 'project:open the project'
'dashboard:open the dashboard'
'tempo:open the tempo'
'reported:search for issues reported by a user'
diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
index 22e0c82c7..0c90544d5 100644
--- a/plugins/jira/jira.plugin.zsh
+++ b/plugins/jira/jira.plugin.zsh
@@ -8,6 +8,7 @@ jira Performs the default action
jira new Opens a new Jira issue dialogue
jira ABC-123 Opens an existing issue
jira ABC-123 m Opens an existing issue for adding a comment
+jira project ABC Opens JIRA project summary
jira dashboard [rapid_view] Opens your JIRA dashboard
jira mine Queries for your own issues
jira tempo Opens your JIRA Tempo
@@ -88,6 +89,9 @@ function jira() {
elif [[ "$action" == "mine" ]]; then
echo "Opening my issues"
open_command "${jira_url}/issues/?filter=-1"
+ elif [[ "$action" == "project" ]]; then
+ echo "Opening project"
+ open_command "${jira_url}/jira/software/c/projects/${2}/summary"
elif [[ "$action" == "dashboard" ]]; then
echo "Opening dashboard"
if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then