fc722807f815bd170849f92d215ce2afa62e55b6

Author
August Feng <46177585+augustfengd@users.noreply.github.com>
Committer
GitHub <noreply@github.com>
Date

Message

refactor(jira)!: rename myissues to mine and add completion (#10931)

Diff

 1diff --git a/plugins/jira/README.md b/plugins/jira/README.md
 2index f8751aaa231c8ab571b05a813a3bec8ef7b086f6..a7cfe6d9e2a61c8d6c4e00528df26176fcdb750d 100644
 3--- a/plugins/jira/README.md
 4+++ b/plugins/jira/README.md
 5@@ -18,11 +18,11 @@ This plugin supplies one command, `jira`, through which all its features are exp
 6 jira            # performs the default action
 7 
 8 jira new        # opens a new issue
 9+jira mine       # queries for your own issues
10 jira dashboard  # opens your JIRA dashboard
11 jira tempo      # opens your JIRA Tempo
12 jira reported [username]  # queries for issues reported by a user
13 jira assigned [username]  # queries for issues assigned to a user
14-jira myissues   # queries for you own issues
15 jira branch     # opens an existing issue matching the current branch name
16                 # The branch name may have prefixes ending in "/": "feature/MP-1234",
17                 # and also suffixes starting with "_": "MP-1234_fix_dashboard"
18diff --git a/plugins/jira/_jira b/plugins/jira/_jira
19index 1ac3eeda32b38aa4cc559f2526d787bcc7c514a1..0e37b7e9d39b55f7c85c766839bf4a47f3fb0d04 100644
20--- a/plugins/jira/_jira
21+++ b/plugins/jira/_jira
22@@ -4,6 +4,7 @@
23 local -a _1st_arguments
24 _1st_arguments=(
25   'new:create a new issue'
26+  'mine:open my issues'
27   'dashboard:open the dashboard'
28   'tempo:open the tempo'
29   'reported:search for issues reported by a user'
30diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
31index 37d7b6a27b6312eae7ae9550a9b752093268ca5b..0add040d185a192fdb36f60610dddae7a06edb78 100644
32--- a/plugins/jira/jira.plugin.zsh
33+++ b/plugins/jira/jira.plugin.zsh
34@@ -44,7 +44,7 @@ function jira() {
35     open_command "${jira_url}/secure/CreateIssue!default.jspa"
36   elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then
37     _jira_query ${@:-$action}
38-  elif [[ "$action" == "myissues" ]]; then
39+  elif [[ "$action" == "mine" ]]; then
40     echo "Opening my issues"
41     open_command "${jira_url}/issues/?filter=-1"
42   elif [[ "$action" == "dashboard" ]]; then