10c1b7d2ca78066e92fd2ff8ff793d8d0a2a9121

Author
Marc Cornellà <marc.cornella@live.com>
Committer
GitHub <noreply@github.com>
Date

Message

jira: add a myissues option (#6696)

This will allow the user to directly open the "my open issues" page. This
will make it easier for the user to open their open issues in jira.

Diff

 1diff --git a/plugins/jira/README.md b/plugins/jira/README.md
 2index a934ae68c5a0c900f50e082b79c51efbbf8621ca..091dccb97dd3db8a1e265c76fa4486bc8395fd86 100644
 3--- a/plugins/jira/README.md
 4+++ b/plugins/jira/README.md
 5@@ -21,6 +21,7 @@ jira new        # opens a new issue
 6 jira dashboard  # opens your JIRA dashboard
 7 jira reported [username]  # queries for issues reported by a user
 8 jira assigned [username]  # queries for issues assigned to a user
 9+jira myissues   # queries for you own issues
10 jira branch     # opens an existing issue matching the current branch name
11 jira ABC-123    # opens an existing issue
12 jira ABC-123 m  # opens an existing issue for adding a comment
13diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
14index fcf8b2959610f3c601d6736697e6f300cb0c8a0b..e706948e9f5fbe0829d07bec90d61ae04112afd1 100644
15--- a/plugins/jira/jira.plugin.zsh
16+++ b/plugins/jira/jira.plugin.zsh
17@@ -44,6 +44,9 @@ function jira() {
18     open_command "${jira_url}/secure/CreateIssue!default.jspa"
19   elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then
20     _jira_query ${@:-$action}
21+  elif [[ "$action" == "myissues" ]]; then
22+    echo "Opening my issues"
23+    open_command "${jira_url}/issues/?filter=-1"
24   elif [[ "$action" == "dashboard" ]]; then
25     echo "Opening dashboard"
26     if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then