From 1ff0906dbbe7cdb160305dc6147bcbb806766dd2 Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Mon, 7 Jul 2008 17:36:02 -0500 Subject: [PATCH] Only put in the username instead of the name+email. --- server/post-receive-trac.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.5