Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
lib/gitlab/chat_commands/issue_show.rb
lib/gitlab/chat_commands/issue_show.rb
+1
-1
spec/lib/gitlab/chat_commands/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