Skip to content
Snippets Groups Projects
Commit 6ec3f987 authored by Kamil Trzciński's avatar Kamil Trzciński
Browse files

Merge branch 'truncate-commitmsg-at-newline' into 'master'

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.

![gitlab-ci-truncate-commitmsg](https://gitlab.com/dgerhardt/gitlab-ci/uploads/a0c601eb1abbce7a7b9e4e0e3f16f303/gitlab-ci-truncate-commitmsg.png)

See merge request !213
parents 42f9bb0e 15f17f79
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