diff --git a/app/models/concerns/feed/git.rb b/app/models/concerns/feed/git.rb index de5ab8ffa..fce35a79f 100644 --- a/app/models/concerns/feed/git.rb +++ b/app/models/concerns/feed/git.rb @@ -17,11 +17,11 @@ module Feed::Git change_type: change_type, project_owner: record.project.owner.uname} else if record.message # online update - last_commits, commits = [[record.newrev, record.message]], [] + last_commits, commits = [[record.newrev, truncate(record.message, 50, omission: '…')]], [] all_commits = last_commits else commits = record.project.repo.commits_between(record.oldrev, record.newrev) - all_commits = commits.collect { |commit| [commit.sha, commit.message] } + all_commits = commits.collect { |commit| [commit.sha, truncate(commit.message, 50, omission: '…')] } last_commits = all_commits.last(3).reverse end