Modified: trunk/Tools/ChangeLog (95041 => 95042)
--- trunk/Tools/ChangeLog 2011-09-13 20:35:17 UTC (rev 95041)
+++ trunk/Tools/ChangeLog 2011-09-13 20:51:29 UTC (rev 95042)
@@ -1,3 +1,15 @@
+2011-09-13 Ryosuke Niwa <rn...@webkit.org>
+
+ sheriffbot whois should also tell us email addresses
+ https://bugs.webkit.org/show_bug.cgi?id=67975
+
+ Reviewed by Eric Seidel and David Levin.
+
+ Taught sheriffbot how to tell us contributor's email addresses.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+
2011-09-13 Eric Seidel <e...@webkit.org>
Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py (95041 => 95042)
--- trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py 2011-09-13 20:35:17 UTC (rev 95041)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py 2011-09-13 20:51:29 UTC (rev 95042)
@@ -191,7 +191,11 @@
contributor = contributors[0]
if not contributor.irc_nickname:
return "%s: %s hasn't told me their nick. Boo hoo :-(" % (nick, contributor)
- return "%s: %s is %s. Why do you ask?" % (nick, search_string, contributor.irc_nickname)
+ if contributor.emails and search_string.lower() not in map(lambda email: email.lower(), contributor.emails):
+ formattedEmails = ', '.join(contributor.emails)
+ return "%s: %s is %s (%s). Why do you ask?" % (nick, search_string, contributor.irc_nickname, formattedEmails)
+ else:
+ return "%s: %s is %s. Why do you ask?" % (nick, search_string, contributor.irc_nickname)
contributor_nicks = map(self._nick_or_full_record, contributors)
contributors_string = join_with_separators(contributor_nicks, _only_two_separator_=" or ", last_separator=', or ')
return "%s: I'm not sure who you mean? %s could be '%s'." % (nick, contributors_string, search_string)
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py (95041 => 95042)
--- trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py 2011-09-13 20:35:17 UTC (rev 95041)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py 2011-09-13 20:51:29 UTC (rev 95042)
@@ -49,6 +49,12 @@
whois.execute("tom", ["unkn...@example.com"], None, None))
self.assertEquals("tom: to...@chromium.org is tonyg-cr. Why do you ask?",
whois.execute("tom", ["to...@chromium.org"], None, None))
+ self.assertEquals("tom: to...@chromium.org is tonyg-cr. Why do you ask?",
+ whois.execute("tom", ["to...@chromium.org"], None, None))
+ self.assertEquals("tom: rniwa is rniwa (rn...@webkit.org). Why do you ask?",
+ whois.execute("tom", ["rniwa"], None, None))
+ self.assertEquals("tom: lopez is xan (xan.lo...@gmail.com, x...@gnome.org, x...@webkit.org). Why do you ask?",
+ whois.execute("tom", ["lopez"], None, None))
self.assertEquals('tom: "Vicki Murley" <vi...@apple.com> hasn\'t told me their nick. Boo hoo :-(',
whois.execute("tom", ["vi...@apple.com"], None, None))
self.assertEquals('tom: I\'m not sure who you mean? eroman, ericu, "Eric Carlson" <eric.carl...@apple.com>, or eseidel could be \'Eric\'.',