Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
5e842cf4
Commit
5e842cf4
authored
Aug 31, 2014
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3041 from takac/master
Update jira plugin to allow lookup of issues
parents
69088270
df1b0b32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
jira.plugin.zsh
plugins/jira/jira.plugin.zsh
+39
-2
No files found.
plugins/jira/jira.plugin.zsh
View file @
5e842cf4
...
...
@@ -26,7 +26,7 @@ open_jira_issue () {
jira_url
=
$JIRA_URL
else
echo
"JIRA url is not specified anywhere."
return
0
return
1
fi
if
[
-f
.jira-prefix
]
;
then
...
...
@@ -39,7 +39,9 @@ open_jira_issue () {
if
[
-z
"
$1
"
]
;
then
echo
"Opening new issue"
$open_cmd
"
$jira_url
/secure/CreateIssue!default.jspa"
$open_cmd
"
${
jira_url
}
/secure/CreateIssue!default.jspa"
elif
[[
"
$1
"
=
"assigned"
||
"
$1
"
=
"reported"
]]
;
then
jira_query
$@
else
echo
"Opening issue #
$1
"
if
[[
"x
$JIRA_RAPID_BOARD
"
=
"xtrue"
]]
;
then
...
...
@@ -50,4 +52,39 @@ open_jira_issue () {
fi
}
jira_name
()
{
if
[[
-z
"
$1
"
]]
;
then
if
[[
"x
${
JIRA_NAME
}
"
!=
"x"
]]
;
then
jira_name
=
${
JIRA_NAME
}
else
echo
"JIRA_NAME not specified"
return
1
fi
else
jira_name
=
$@
fi
}
jira_query
()
{
verb
=
"
$1
"
if
[[
"
${
verb
}
"
=
"reported"
]]
;
then
lookup
=
reporter
preposition
=
by
elif
[[
"
${
verb
}
"
=
"assigned"
]]
;
then
lookup
=
assignee
preposition
=
to
else
echo
"not a valid lookup
$verb
"
return
1
fi
shift
1
jira_name
$@
if
[[
$?
=
1
]]
;
then
return
1
fi
echo
"Browsing issues
${
verb
}
${
preposition
}
${
jira_name
}
"
$open_cmd
"
${
jira_url
}
/secure/IssueNavigator.jspa?reset=true&jqlQuery=
${
lookup
}
+%3D+%22
${
jira_name
}
%22+AND+resolution+%3D+unresolved+ORDER+BY+priority+DESC%2C+created+ASC"
}
alias
jira
=
'open_jira_issue'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment