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
Jérome Perrin
gitlab-ce
Commits
63bd79f5
Commit
63bd79f5
authored
Feb 21, 2017
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chat slash commands show labels correctly
parent
b596dd8f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
1 deletion
+20
-1
changelogs/unreleased/zj-fix-slash-command-labels.yml
changelogs/unreleased/zj-fix-slash-command-labels.yml
+4
-0
lib/gitlab/chat_commands/presenters/issue_base.rb
lib/gitlab/chat_commands/presenters/issue_base.rb
+1
-1
spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb
spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb
+15
-0
No files found.
changelogs/unreleased/zj-fix-slash-command-labels.yml
0 → 100644
View file @
63bd79f5
---
title
:
Chat slash commands show labels correctly
merge_request
:
author
:
lib/gitlab/chat_commands/presenters/issue_base.rb
View file @
63bd79f5
...
...
@@ -32,7 +32,7 @@ module Gitlab
},
{
title:
"Labels"
,
value:
@resource
.
labels
.
any?
?
@resource
.
label_names
:
"_None_"
,
value:
@resource
.
labels
.
any?
?
@resource
.
label_names
.
join
(
', '
)
:
"_None_"
,
short:
true
}
]
...
...
spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb
View file @
63bd79f5
...
...
@@ -26,6 +26,21 @@ describe Gitlab::ChatCommands::Presenters::IssueShow do
end
end
context
'with labels'
do
let
(
:label
)
{
create
(
:label
,
project:
project
,
title:
'mep'
)
}
let
(
:label1
)
{
create
(
:label
,
project:
project
,
title:
'mop'
)
}
before
do
issue
.
labels
<<
[
label
,
label1
]
end
it
'shows the labels'
do
labels
=
attachment
[
:fields
].
find
{
|
f
|
f
[
:title
]
==
'Labels'
}
expect
(
labels
[
:value
]).
to
eq
(
"mep, mop"
)
end
end
context
'confidential issue'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
...
...
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