BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
fc035011
Commit
fc035011
authored
Nov 25, 2016
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-slash-commands-improvements' into 'master'
Slash commands improvements See merge request !7638
parents
838c1aad
d71ad49f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
issue_show.rb
lib/gitlab/chat_commands/issue_show.rb
+1
-1
issue_show_spec.rb
spec/lib/gitlab/chat_commands/issue_show_spec.rb
+8
-0
No files found.
lib/gitlab/chat_commands/issue_show.rb
View file @
fc035011
...
...
@@ -2,7 +2,7 @@ module Gitlab
module
ChatCommands
class
IssueShow
<
IssueCommand
def
self
.
match
(
text
)
/\Aissue\s+show\s+(?<iid>\d+)/
.
match
(
text
)
/\Aissue\s+show\s+
#{
Issue
.
reference_prefix
}
?
(?<iid>\d+)/
.
match
(
text
)
end
def
self
.
help_message
...
...
spec/lib/gitlab/chat_commands/issue_show_spec.rb
View file @
fc035011
...
...
@@ -19,6 +19,14 @@ describe Gitlab::ChatCommands::IssueShow, service: true do
it
'returns the issue'
do
expect
(
subject
.
iid
).
to
be
issue
.
iid
end
context
'when its reference is given'
do
let
(
:regex_match
)
{
described_class
.
match
(
"issue show
#{
issue
.
to_reference
}
"
)
}
it
'shows the issue'
do
expect
(
subject
.
iid
).
to
be
issue
.
iid
end
end
end
context
'the issue does not exist'
do
...
...
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