diff options
Diffstat (limited to 'app/models/project_services/chat_message/push_message.rb')
-rw-r--r-- | app/models/project_services/chat_message/push_message.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/app/models/project_services/chat_message/push_message.rb b/app/models/project_services/chat_message/push_message.rb index 07622f570c2..41b0cbb2c4d 100644 --- a/app/models/project_services/chat_message/push_message.rb +++ b/app/models/project_services/chat_message/push_message.rb @@ -52,8 +52,7 @@ module ChatMessage end def commit_messages - linebreak_chars = commit_message_html ? "<br/>\n<br/>\n" : "\n\n" - commits.map { |commit| compose_commit_message(commit) }.join(linebreak_chars) + commits.map { |commit| compose_commit_message(commit) }.join("\n\n") end def commit_message_attachments @@ -63,15 +62,11 @@ module ChatMessage def compose_commit_message(commit) author = commit[:author][:name] id = Commit.truncate_sha(commit[:id]) - message = commit[:message] - - if commit_message_html - message = message.gsub(Gitlab::Regex.breakline_regex, "<br/>\n") - end + title = commit[:title] url = commit[:url] - "[#{id}](#{url}): #{message} - #{author}" + "[#{id}](#{url}): #{title} - #{author}" end def new_branch? |