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
Boxiang Sun
gitlab-ce
Commits
2fa20f2d
Commit
2fa20f2d
authored
Mar 28, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle nil descriptions in Slack issue messages
Closes #14676
parent
30e4d3ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
CHANGELOG
CHANGELOG
+1
-0
app/models/project_services/slack_service/issue_message.rb
app/models/project_services/slack_service/issue_message.rb
+1
-1
spec/models/project_services/slack_service/issue_message_spec.rb
...dels/project_services/slack_service/issue_message_spec.rb
+10
-0
No files found.
CHANGELOG
View file @
2fa20f2d
...
...
@@ -6,6 +6,7 @@ v 8.7.0 (unreleased)
- Make HTTP(s) label consistent on clone bar (Stan Hu)
- Fix avatar stretching by providing a cropping feature
- Add links to CI setup documentation from project settings and builds pages
- Handle nil descriptions in Slack issue messages (Stan Hu)
- Implement 'Groups View' as an option for dashboard preferences !3379 (Elias W.)
- Implement 'TODOs View' as an option for dashboard preferences !3379 (Elias W.)
...
...
app/models/project_services/slack_service/issue_message.rb
View file @
2fa20f2d
...
...
@@ -22,7 +22,7 @@ class SlackService
@issue_url
=
obj_attr
[
:url
]
@action
=
obj_attr
[
:action
]
@state
=
obj_attr
[
:state
]
@description
=
obj_attr
[
:description
]
@description
=
obj_attr
[
:description
]
||
''
end
def
attachments
...
...
spec/models/project_services/slack_service/issue_message_spec.rb
View file @
2fa20f2d
...
...
@@ -27,6 +27,16 @@ describe SlackService::IssueMessage, models: true do
let
(
:color
)
{
'#345'
}
context
'#initialize'
do
before
do
args
[
:object_attributes
][
:description
]
=
nil
end
it
'returns a non-null description'
do
expect
(
subject
.
description
).
to
eq
(
''
)
end
end
context
'open'
do
it
'returns a message regarding opening of issues'
do
expect
(
subject
.
pretext
).
to
eq
(
...
...
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