[#369] truncate activity commit messages
This commit is contained in:
parent
7644a0f4cc
commit
54ce497e61
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue