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
3d034c15
Commit
3d034c15
authored
Oct 04, 2016
by
David Eisner
Committed by
Airat Shigapov
Oct 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Full Banzai rendering for HipChat notifications
parent
b5d210c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
app/models/project_services/hipchat_service.rb
app/models/project_services/hipchat_service.rb
+3
-11
No files found.
app/models/project_services/hipchat_service.rb
View file @
3d034c15
...
...
@@ -121,14 +121,6 @@ class HipchatService < Service
message
end
def
format_body
(
body
)
if
body
body
=
body
.
truncate
(
200
,
separator:
' '
,
omission:
'...'
)
end
"<pre>
#{
body
}
</pre>"
end
def
create_issue_message
(
data
)
user_name
=
data
[
:user
][
:name
]
...
...
@@ -144,7 +136,7 @@ class HipchatService < Service
message
=
"
#{
user_name
}
#{
state
}
#{
issue_link
}
in
#{
project_link
}
: <b>
#{
title
}
</b>"
if
description
message
<<
format_body
(
Banzai
::
Filter
::
MarkdownFilter
.
renderer
.
render
(
description
)
)
message
<<
Banzai
.
render
(
note
,
project:
project
)
end
message
...
...
@@ -166,7 +158,7 @@ class HipchatService < Service
"
#{
project_link
}
: <b>
#{
title
}
</b>"
if
description
message
<<
format_body
(
Banzai
::
Filter
::
MarkdownFilter
.
renderer
.
render
(
description
)
)
message
<<
Banzai
.
render
(
note
,
project:
project
)
end
message
...
...
@@ -217,7 +209,7 @@ class HipchatService < Service
message
<<
title
if
note
message
<<
format_body
(
Banzai
::
Filter
::
MarkdownFilter
.
renderer
.
render
(
note
)
)
message
<<
Banzai
.
render
(
note
,
project:
project
)
end
message
...
...
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