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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
37495394
Commit
37495394
authored
Feb 09, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-add-weights-gitlab-response' into 'master'
Add weight to chat messages See merge request !1172
parents
817d454b
ec10de7a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
lib/gitlab/chat_commands/presenters/issuable.rb
lib/gitlab/chat_commands/presenters/issuable.rb
+5
-0
spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb
spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb
+10
-0
No files found.
lib/gitlab/chat_commands/presenters/issuable.rb
View file @
37495394
...
...
@@ -34,6 +34,11 @@ module Gitlab
title:
"Labels"
,
value:
@resource
.
labels
.
any?
?
@resource
.
label_names
:
"_None_"
,
short:
true
},
{
title:
"Weight"
,
value:
@resource
.
weight?
?
@resource
.
weight
:
"_None_"
,
short:
true
}
]
end
...
...
spec/lib/gitlab/chat_commands/presenters/issue_show_spec.rb
View file @
37495394
...
...
@@ -34,4 +34,14 @@ describe Gitlab::ChatCommands::Presenters::IssueShow do
expect
(
attachment
[
:text
]).
to
start_with
(
"**Open**"
)
end
end
context
'issue with issue weight'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
,
weight:
3
)
}
let
(
:weight_attachment
)
{
subject
[
:attachments
].
first
[
:fields
].
find
{
|
a
|
a
[
:title
]
==
"Weight"
}
}
it
'shows the weight'
do
expect
(
weight_attachment
).
not_to
be_nil
expect
(
weight_attachment
[
:value
]).
to
be
(
3
)
end
end
end
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