Repository: allura Updated Branches: refs/heads/master 6a84b2c03 -> 2c2b2f19e
Longer activity for commits, too Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/2c2b2f19 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2c2b2f19 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2c2b2f19 Branch: refs/heads/master Commit: 2c2b2f19e9012b8f37caa3ab3364470eafae82cf Parents: 6a84b2c Author: Dave Brondsema <d...@brondsema.net> Authored: Wed Apr 19 11:14:05 2017 -0400 Committer: Dave Brondsema <d...@brondsema.net> Committed: Wed Apr 19 11:14:05 2017 -0400 ---------------------------------------------------------------------- Allura/allura/model/repository.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/2c2b2f19/Allura/allura/model/repository.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py index 88d4612..4c508b7 100644 --- a/Allura/allura/model/repository.py +++ b/Allura/allura/model/repository.py @@ -1059,7 +1059,7 @@ class Commit(RepoObject, ActivityObject): @property def activity_extras(self): d = ActivityObject.activity_extras.fget(self) - d.update(summary=self.summary) + d.update(summary=self._summary(limit=500)) if self.repo: d.update(app_config_id=self.repo.app.config._id) return d @@ -1121,9 +1121,12 @@ class Commit(RepoObject, ActivityObject): @LazyProperty def summary(self): + return self._summary() + + def _summary(self, limit=50): message = h.really_unicode(self.message) first_line = message.split('\n')[0] - return h.text.truncate(first_line, 50) + return h.text.truncate(first_line, limit) def shorthand_id(self): if self.repo is None: