Include commit message in SVN activity

This commit is contained in:
2016-11-10 15:33:55 +01:00
parent 72e903d192
commit 268d1f28e3
2 changed files with 69 additions and 4 deletions

View File

@@ -172,13 +172,14 @@ class TaskManager(object):
# to the current user (the SVNer service account) if there is no mapping.
usermap = proj['extension_props'].get('attract', {}).get('svn_usermap', {})
user_id = usermap.get(log_entry.author, None)
msg = 'committed SVN revision %s' % log_entry.revision
if not user_id:
if user_id:
msg = 'committed SVN revision %s: %s' % (log_entry.revision, log_entry.msg)
else:
self._log.warning(u'No Pillar user mapped for SVN user %s, using SVNer account.',
log_entry.author)
user_id = authentication.current_user_id()
msg = 'committed SVN revision %s authored by SVN user %s' % (
log_entry.revision, log_entry.author)
msg = 'committed SVN revision %s authored by SVN user %s: %s' % (
log_entry.revision, log_entry.author, log_entry.msg)
register_activity(
user_id, msg,