6591606d566cb37d53a7b996f0ff05a59998dc16

Author
Ken van der Eerden <15888558+Ken-vdE@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(jira): add `project` command to open project (#12851)

Diff

 1diff --git a/plugins/jira/README.md b/plugins/jira/README.md
 2index 19266e7f0721af5476adfc10e7b6cd25f7e40bf0..f6e2e26f4700dc17309c28f839b12bb5809e5d49 100644
 3--- a/plugins/jira/README.md
 4+++ b/plugins/jira/README.md
 5@@ -26,6 +26,7 @@ This plugin supplies one command, `jira`, through which all its features are exp
 6 | `jira new`                    | Opens a new Jira issue dialogue                          |
 7 | `jira ABC-123`                | Opens an existing issue                                  |
 8 | `jira ABC-123 m`              | Opens an existing issue for adding a comment             |
 9+| `jira project ABC`            | Opens JIRA project summary                               |
10 | `jira dashboard [rapid_view]` | Opens your JIRA dashboard                                |
11 | `jira mine`                   | Queries for your own issues                              |
12 | `jira tempo`                  | Opens your JIRA Tempo                                    |
13diff --git a/plugins/jira/_jira b/plugins/jira/_jira
14index 5f7dcd09d62ce6c4903b0d7ac21284e72b18f414..617a3e5018007b7a52904e3c29928a8a0a6b7abb 100644
15--- a/plugins/jira/_jira
16+++ b/plugins/jira/_jira
17@@ -5,6 +5,7 @@ local -a _1st_arguments
18 _1st_arguments=(
19   'new:create a new issue'
20   'mine:open my issues'
21+  'project:open the project'
22   'dashboard:open the dashboard'
23   'tempo:open the tempo'
24   'reported:search for issues reported by a user'
25diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
26index 22e0c82c7fcc60738d282acc322907ef21c56db6..0c90544d5e267ed651e8549d160214c65578cb56 100644
27--- a/plugins/jira/jira.plugin.zsh
28+++ b/plugins/jira/jira.plugin.zsh
29@@ -8,6 +8,7 @@ jira                            Performs the default action
30 jira new                        Opens a new Jira issue dialogue
31 jira ABC-123                    Opens an existing issue
32 jira ABC-123 m                  Opens an existing issue for adding a comment
33+jira project ABC                Opens JIRA project summary
34 jira dashboard [rapid_view]     Opens your JIRA dashboard
35 jira mine                       Queries for your own issues
36 jira tempo                      Opens your JIRA Tempo
37@@ -88,6 +89,9 @@ function jira() {
38   elif [[ "$action" == "mine" ]]; then
39     echo "Opening my issues"
40     open_command "${jira_url}/issues/?filter=-1"
41+  elif [[ "$action" == "project" ]]; then
42+    echo "Opening project"
43+    open_command "${jira_url}/jira/software/c/projects/${2}/summary"
44   elif [[ "$action" == "dashboard" ]]; then
45     echo "Opening dashboard"
46     if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then