浏览代码

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

Ken van der Eerden 1 月之前
父节点
当前提交
6591606d56
共有 3 个文件被更改,包括 6 次插入0 次删除
  1. 1 0
      plugins/jira/README.md
  2. 1 0
      plugins/jira/_jira
  3. 4 0
      plugins/jira/jira.plugin.zsh

+ 1 - 0
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                                    |

+ 1 - 0
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'

+ 4 - 0
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