Skip to content
Snippets Groups Projects
Commit 15f17f79 authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Truncate commit messages after subject line in table

Commit messages are now additionally truncated after the first line.
Before, a commit message's body was attached behind the subject which
made messages hardly readable in some cases.
parent f1db513a
No related branches found
No related tags found
No related merge requests found
v7.14.0 (unreleased)
- Truncate commit messages after subject line in table
- Adjust CI config to support Docker executors
v7.13.1
Loading
Loading
Loading
Loading
@@ -15,4 +15,8 @@ module CommitsHelper
def commit_link(commit)
link_to(commit.short_sha, project_ref_commit_path(commit.project, commit.ref, commit.sha))
end
def truncate_first_line(message, length = 50)
truncate(message.lines.first.chomp, length: length)
end
end
Loading
Loading
@@ -11,7 +11,7 @@
%strong #{commit.short_sha}
 
%td.build-message
%span= truncate(commit.git_commit_message, length: 50)
%span= truncate_first_line(commit.git_commit_message)
 
%td.build-branch
- unless @ref
Loading
Loading
@@ -30,4 +30,3 @@
%td.coverage
- if commit.coverage
#{commit.coverage}%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment