From: Stephen Haberman Date: Mon, 7 Jul 2008 22:36:02 +0000 (-0500) Subject: Only put in the username instead of the name+email. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ff0906dbbe7cdb160305dc6147bcbb806766dd2;p=git-central.git Only put in the username instead of the name+email. --- diff --git a/server/post-receive-trac.py b/server/post-receive-trac.py index 383521b..661cb37 100644 --- a/server/post-receive-trac.py +++ b/server/post-receive-trac.py @@ -33,6 +33,7 @@ def qa(ticket): commands = { 're': refs, 'refs': refs, 'qa': qa } commandPattern = re.compile(r'(?P[A-Za-z]*).?(?P#[0-9]+(?:(?:[, &]*|[ ]?and[ ]?)#[0-9]+)*)') ticketPattern = re.compile(r'#([0-9]*)') +authorPattern = re.compile(r'<(.+)@') tickets = {} env = open_environment(project) @@ -60,9 +61,10 @@ for ticketId, commands in tickets.iteritems(): if change['permanent']: cnum += 1 + username = authorPattern.findall(changeset.author)[0] now = datetime.now(utc) message = "(In [%s]) %s" % (rev, changeset.message) - ticket.save_changes(changeset.author, message, now, db, cnum+1) + ticket.save_changes(username, message, now, db, cnum+1) db.commit() tn = TicketNotifyEmail(env)