1 # Copyright (c) 2009, Google Inc. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer
11 # in the documentation and/or other materials provided with the
13 # * Neither the name of Google Inc. nor the names of its
14 # contributors may be used to endorse or promote products derived from
15 # this software without specific prior written permission.
17 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 # WebKit's Python module for committer and reviewer validation
32 def __init__(self, name, email):
34 self.bugzilla_email = email
35 self.can_review = False
38 return '"%s" <%s>' % (self.full_name, self.bugzilla_email)
40 class Reviewer(Committer):
41 def __init__(self, name, email):
42 Committer.__init__(self, name, email)
43 self.can_review = True
45 # All reviewers are committers, so this list is only of committers
46 # who are not reviewers.
47 committers_unable_to_review = [
48 Committer("Aaron Boodman", "aa@chromium.org"),
49 Committer("Adam Langley", "agl@chromium.org"),
50 Committer("Albert J. Wong", "ajwong@chromium.org"),
51 Committer("Antonio Gomes", "tonikitoo@webkit.org"),
52 Committer("Anthony Ricaud", "rik@webkit.org"),
53 Committer("Ben Murdoch", "benm@google.com"),
54 Committer("Brent Fulgham", "bfulgham@webkit.org"),
55 Committer("Brian Weinstein", "bweinstein@apple.com"),
56 Committer("Cameron McCormack", "cam@webkit.org"),
57 Committer("Daniel Bates", "dbates@webkit.org"),
58 Committer("Drew Wilson", "atwilson@chromium.org"),
59 Committer("Dirk Schulze", "krit@webkit.org"),
60 Committer("Dmitry Titov", "dimich@chromium.org"),
61 Committer("Eli Fidler", "eli@staikos.net"),
62 Committer("Eric Roman", "eroman@chromium.org"),
63 Committer("Fumitoshi Ukai", "ukai@chromium.org"),
64 Committer("Greg Bolsinga", "bolsinga@apple.com"),
65 Committer("Jeremy Moskovich", "playmobil@google.com"),
66 Committer("Jeremy Orlow", "jorlow@chromium.org"),
67 Committer("Jian Li", "jianli@chromium.org"),
68 Committer("John Abd-El-Malek", "jam@chromium.org"),
69 Committer("Joseph Pecoraro", "joepeck@webkit.org"),
70 Committer("Julie Parent", "jparent@google.com"),
71 Committer("Kenneth Rohde Christiansen", "kenneth@webkit.org"),
72 Committer("Laszlo Gombos", "laszlo.1.gombos@nokia.com"),
73 Committer("Nate Chapin", "japhet@chromium.org"),
74 Committer("Ojan Vafai", "ojan@chromium.org"),
75 Committer("Pam Greene", "pam@chromium.org"),
76 Committer("Peter Kasting", "pkasting@google.com"),
77 Committer("Pierre d'Herbemont", "pdherbemont@free.fr"),
78 Committer("Ryosuke Niwa", "rniwa@webkit.org"),
79 Committer("Scott Violet", "sky@chromium.org"),
80 Committer("Shinichiro Hamaji", "hamaji@chromium.org"),
81 Committer("Tony Chang", "tony@chromium.org"),
82 Committer("Yael Aharon", "yael.aharon@nokia.com"),
83 Committer("Yong Li", "yong.li@torchmobile.com"),
84 Committer("Zoltan Horvath", "zoltan@webkit.org"),
88 Reviewer("Adam Barth", "abarth@webkit.org"),
89 Reviewer("Adam Roben", "aroben@apple.com"),
90 Reviewer("Adam Treat", "treat@kde.org"),
91 Reviewer("Adele Peterson", "adele@apple.com"),
92 Reviewer("Alexey Proskuryakov", "ap@webkit.org"),
93 Reviewer("Anders Carlsson", "andersca@apple.com"),
94 Reviewer("Antti Koivisto", "koivisto@iki.fi"),
95 Reviewer("Ariya Hidayat", "ariya.hidayat@trolltech.com"),
96 Reviewer("Brady Eidson", "beidson@apple.com"),
97 Reviewer("Dan Bernstein", "mitz@webkit.org"),
98 Reviewer("Darin Adler", "darin@apple.com"),
99 Reviewer("Darin Fisher", "fishd@chromium.org"),
100 Reviewer("David Hyatt", "hyatt@apple.com"),
101 Reviewer("David Kilzer", "ddkilzer@webkit.org"),
102 Reviewer("David Levin", "levin@chromium.org"),
103 Reviewer("Dimitri Glazkov", "dglazkov@chromium.org"),
104 Reviewer("Eric Carlson", "eric.carlson@apple.com"),
105 Reviewer("Eric Seidel", "eric@webkit.org"),
106 Reviewer("Gavin Barraclough", "barraclough@apple.com"),
107 Reviewer("Geoffrey Garen", "ggaren@apple.com"),
108 Reviewer("George Staikos", "staikos@kde.org"),
109 Reviewer("Gustavo Noronha", "gns@gnome.org"),
110 Reviewer("Holger Freyther", "zecke@selfish.org"),
111 Reviewer("Jan Alonzo", "jmalonzo@gmail.com"),
112 Reviewer("John Sullivan", "sullivan@apple.com"),
113 Reviewer("Justin Garcia", "justin.garcia@apple.com"),
114 Reviewer("Kevin McCullough", "kmccullough@apple.com"),
115 Reviewer("Kevin Ollivier", "kevino@theolliviers.com"),
116 Reviewer("Maciej Stachowiak", "mjs@apple.com"),
117 Reviewer("Mark Rowe", "mrowe@apple.com"),
118 Reviewer("Nikolas Zimmermann", "zimmermann@kde.org"),
119 Reviewer("Oliver Hunt", "oliver@apple.com"),
120 Reviewer("Sam Weinig", "sam@webkit.org"),
121 Reviewer("Simon Fraser", "simon.fraser@apple.com"),
122 Reviewer("Simon Hausmann", "hausmann@webkit.org"),
123 Reviewer("Steve Falkenburg", "sfalken@apple.com"),
124 Reviewer("Timothy Hatcher", "timothy@hatcher.name"),
125 Reviewer(u'Tor Arne Vestb\xf8', "vestbo@webkit.org"),
126 Reviewer("Xan Lopez", "xan.lopez@gmail.com"),
131 # Committers and reviewers are passed in to allow easy testing
132 def __init__(self, committers=committers_unable_to_review, reviewers=reviewers_list):
133 self._committers = committers + reviewers
134 self._reviewers = reviewers
135 self._committers_by_email = {}
137 def committers(self):
138 return self._committers
140 def _email_to_committer_map(self):
141 if not len(self._committers_by_email):
142 for committer in self._committers:
143 self._committers_by_email[committer.bugzilla_email] = committer
144 return self._committers_by_email
146 def committer_by_bugzilla_email(self, bugzilla_email):
147 return self._email_to_committer_map().get(bugzilla_email)
149 def reviewer_by_bugzilla_email(self, bugzilla_email):
150 committer = self.committer_by_bugzilla_email(bugzilla_email)
151 if committer and not committer.can_review: