Show only first line of commit message on dashboard
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
6055c615db
commit
844f8fd213
2 changed files with 7 additions and 1 deletions
|
@ -127,4 +127,10 @@ module EventsHelper
|
|||
text = truncate(text, length: 150)
|
||||
sanitize(markdown(text), tags: %w(a img b pre p))
|
||||
end
|
||||
|
||||
def event_commit_title(message)
|
||||
escape_once(truncate(message.split("\n").first, length: 70))
|
||||
rescue
|
||||
"--broken encoding"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
.commit-row-title
|
||||
= link_to commit[:id][0..8], project_commit_path(project, commit[:id]), class: "commit_short_id", alt: ''
|
||||
|
||||
= gfm escape_once(truncate(commit[:message], length: 70)) rescue "--broken encoding"
|
||||
= gfm event_commit_title(commit[:message])
|
||||
|
|
Loading…
Reference in a new issue