From e4d6a6d3cdaf869cef1a8218ef1bb7eb6ed0b94c Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Tue, 5 Feb 2013 15:31:02 -0500 Subject: [PATCH] review: Send @username syntax rather than @username@humbughq.com (imported from commit ab7d1120aba829fd629e705409b3677e6cb49dbd) --- tools/review | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/review b/tools/review index 8549434336..bdfe513d2b 100755 --- a/tools/review +++ b/tools/review @@ -328,14 +328,14 @@ def main(args): email=get_current_user_email(repo), site="https://staging.humbughq.com", verbose=True) - content = "" - for (key, value) in headers: - if key == "To": - content += "Sent a review request to @%s for\n" % (value,) - if key == "Subject": - content += str(value) - subject = "Reviews for " + ", ".join(x.split("@")[0] for x in opts.reviewers) + reviewer_usernames = [x.split("@")[0] for x in opts.reviewers] + + content = ("Sent a review request to %s for\n%s" % + (' '.join('@'+x for x in reviewer_usernames), + msg.get('Subject', ''))) + subject = "Reviews for " + ", ".join(reviewer_usernames) + client.send_message({'type': "stream", 'subject': subject[:60], 'to': "review",