Unreviewed.
[WebKit.git] / WebKitTools / Scripts / webkitpy / common / config / committers.py
1 # Copyright (c) 2009, Google Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are
5 # met:
6 #
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
12 # distribution.
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.
16 #
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.
28 #
29 # WebKit's Python module for committer and reviewer validation
30
31
32 class Committer:
33
34     def __init__(self, name, email_or_emails, irc_nickname=None):
35         self.full_name = name
36         if isinstance(email_or_emails, str):
37             self.emails = [email_or_emails]
38         else:
39             self.emails = email_or_emails
40         self.irc_nickname = irc_nickname
41         self.can_review = False
42
43     def bugzilla_email(self):
44         # FIXME: We're assuming the first email is a valid bugzilla email,
45         # which might not be right.
46         return self.emails[0]
47
48     def __str__(self):
49         return '"%s" <%s>' % (self.full_name, self.emails[0])
50
51
52 class Reviewer(Committer):
53
54     def __init__(self, name, email_or_emails, irc_nickname=None):
55         Committer.__init__(self, name, email_or_emails, irc_nickname)
56         self.can_review = True
57
58
59 # This is intended as a canonical, machine-readable list of all non-reviewer
60 # committers for WebKit.  If your name is missing here and you are a committer,
61 # please add it.  No review needed.  All reviewers are committers, so this list
62 # is only of committers who are not reviewers.
63
64
65 committers_unable_to_review = [
66     Committer("Aaron Boodman", "aa@chromium.org", "aboodman"),
67     Committer("Adam Langley", "agl@chromium.org", "agl"),
68     Committer("Albert J. Wong", "ajwong@chromium.org"),
69     Committer("Alejandro G. Castro", ["alex@igalia.com", "alex@webkit.org"]),
70     Committer("Alexander Kellett", ["lypanov@mac.com", "a-lists001@lypanov.net", "lypanov@kde.org"], "lypanov"),
71     Committer("Alexander Pavlov", "apavlov@chromium.org"),
72     Committer("Andre Boule", "aboule@apple.com"),
73     Committer("Andrew Wellington", ["andrew@webkit.org", "proton@wiretapped.net"], "proton"),
74     Committer("Andras Becsi", "abecsi@webkit.org", "bbandix"),
75     Committer("Andy Estes", "aestes@apple.com", "estes"),
76     Committer("Anthony Ricaud", "rik@webkit.org", "rik"),
77     Committer("Anton Muhin", "antonm@chromium.org", "antonm"),
78     Committer("Antonio Gomes", "tonikitoo@webkit.org", "tonikitoo"),
79     Committer("Ben Murdoch", "benm@google.com", "benm"),
80     Committer("Benjamin C Meyer", ["ben@meyerhome.net", "ben@webkit.org"], "icefox"),
81     Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"], "otte"),
82     Committer("Brent Fulgham", "bfulgham@webkit.org", "bfulgham"),
83     Committer("Brett Wilson", "brettw@chromium.org", "brettx"),
84     Committer("Brian Weinstein", "bweinstein@apple.com", "bweinstein"),
85     Committer("Cameron McCormack", "cam@webkit.org", "heycam"),
86     Committer("Carol Szabo", "carol.szabo@nokia.com"),
87     Committer("Chang Shu", "Chang.Shu@nokia.com"),
88     Committer("Chris Fleizach", "cfleizach@apple.com"),
89     Committer("Chris Jerdonek", "cjerdonek@webkit.org", "cjerdonek"),
90     Committer("Chris Marrin", "cmarrin@apple.com", "cmarrin"),
91     Committer("Chris Petersen", "cpetersen@apple.com", "cpetersen"),
92     Committer("Christian Dywan", ["christian@twotoasts.de", "christian@webkit.org"]),
93     Committer("Collin Jackson", "collinj@webkit.org"),
94     Committer("Csaba Osztrogonac", "ossy@webkit.org", "ossy"),
95     Committer("David Smith", ["catfish.man@gmail.com", "dsmith@webkit.org"], "catfishman"),
96     Committer("Dean Jackson", "dino@apple.com", "dino"),
97     Committer("Dirk Pranke", "dpranke@chromium.org"),
98     Committer("Drew Wilson", "atwilson@chromium.org", "atwilson"),
99     Committer("Dumitru Daniliuc", "dumi@chromium.org", "dumi"),
100     Committer("Eli Fidler", "eli@staikos.net", "QBin"),
101     Committer("Enrica Casucci", "enrica@apple.com"),
102     Committer("Erik Arvidsson", "arv@chromium.org", "arv"),
103     Committer("Eric Roman", "eroman@chromium.org", "eroman"),
104     Committer("Feng Qian", "feng@chromium.org"),
105     Committer("Fumitoshi Ukai", "ukai@chromium.org", "ukai"),
106     Committer("Gabor Loki", "loki@webkit.org", "loki04"),
107     Committer("Girish Ramakrishnan", ["girish@forwardbias.in", "ramakrishnan.girish@gmail.com"]),
108     Committer("Graham Dennis", ["Graham.Dennis@gmail.com", "gdennis@webkit.org"]),
109     Committer("Greg Bolsinga", "bolsinga@apple.com"),
110     Committer("Hin-Chung Lam", ["hclam@google.com", "hclam@chromium.org"]),
111     Committer("Ilya Tikhonovsky", "loislo@chromium.org", "loislo"),
112     Committer("Jakob Petsovits", ["jpetsovits@rim.com", "jpetso@gmx.at"], "jpetso"),
113     Committer("Jakub Wieczorek", "jwieczorek@webkit.org"),
114     Committer("James Hawkins", ["jhawkins@chromium.org", "jhawkins@google.com"], "jhawkins"),
115     Committer("James Robinson", ["jamesr@chromium.org", "jamesr@google.com"]),
116     Committer("Jens Alfke", ["snej@chromium.org", "jens@apple.com"]),
117     Committer("Jeremy Moskovich", ["playmobil@google.com", "jeremy@chromium.org"], "jeremymos"),
118     Committer("Jessie Berlin", ["jberlin@webkit.org", "jberlin@apple.com"]),
119     Committer("Jesus Sanchez-Palencia", ["jesus@webkit.org", "jesus.palencia@openbossa.org"], "jeez_"),
120     Committer("John Abd-El-Malek", "jam@chromium.org", "jam"),
121     Committer("John Gregg", ["johnnyg@google.com", "johnnyg@chromium.org"], "johnnyg"),
122     Committer("Joost de Valk", ["joost@webkit.org", "webkit-dev@joostdevalk.nl"], "Altha"),
123     Committer("Julie Parent", ["jparent@google.com", "jparent@chromium.org"], "jparent"),
124     Committer("Julien Chaffraix", ["jchaffraix@webkit.org", "julien.chaffraix@gmail.com"]),
125     Committer("Jungshik Shin", "jshin@chromium.org"),
126     Committer("Keishi Hattori", "keishi@webkit.org", "keishi"),
127     Committer("Kelly Norton", "knorton@google.com"),
128     Committer("Kenneth Russell", "kbr@google.com"),
129     Committer("Kent Tamura", "tkent@chromium.org", "tkent"),
130     Committer("Krzysztof Kowalczyk", "kkowalczyk@gmail.com"),
131     Committer("Levi Weintraub", "lweintraub@apple.com"),
132     Committer("Mads Ager", "ager@chromium.org"),
133     Committer("Matt Lilek", ["webkit@mattlilek.com", "pewtermoose@webkit.org"]),
134     Committer("Matt Perry", "mpcomplete@chromium.org"),
135     Committer("Maxime Britto", ["maxime.britto@gmail.com", "britto@apple.com"]),
136     Committer("Maxime Simon", ["simon.maxime@gmail.com", "maxime.simon@webkit.org"], "maxime.simon"),
137     Committer("Martin Robinson", ["mrobinson@webkit.org", "martin.james.robinson@gmail.com"]),
138     Committer("Michelangelo De Simone", "michelangelo@webkit.org", "michelangelo"),
139     Committer("Mike Belshe", ["mbelshe@chromium.org", "mike@belshe.com"]),
140     Committer("Mike Fenton", ["mike.fenton@torchmobile.com", "mifenton@rim.com"], "mfenton"),
141     Committer("Mike Thole", ["mthole@mikethole.com", "mthole@apple.com"]),
142     Committer("Mikhail Naganov", "mnaganov@chromium.org"),
143     Committer("Ojan Vafai", "ojan@chromium.org", "ojan"),
144     Committer("Pam Greene", "pam@chromium.org", "pamg"),
145     Committer("Peter Kasting", ["pkasting@google.com", "pkasting@chromium.org"], "pkasting"),
146     Committer("Philippe Normand", ["pnormand@igalia.com", "philn@webkit.org"], "pnormand"),
147     Committer("Pierre d'Herbemont", ["pdherbemont@free.fr", "pdherbemont@apple.com"], "pdherbemont"),
148     Committer("Pierre-Olivier Latour", "pol@apple.com", "pol"),
149     Committer("Robert Hogan", ["robert@webkit.org", "robert@roberthogan.net"], "mwenge"),
150     Committer("Roland Steiner", "rolandsteiner@chromium.org"),
151     Committer("Ryosuke Niwa", "rniwa@webkit.org", "rniwa"),
152     Committer("Scott Violet", "sky@chromium.org", "sky"),
153     Committer("Stephen White", "senorblanco@chromium.org", "senorblanco"),
154     Committer("Steve Block", "steveblock@google.com"),
155     Committer("Tony Chang", "tony@chromium.org", "tony^work"),
156     Committer("Trey Matteson", "trey@usa.net", "trey"),
157     Committer("Tristan O'Tierney", ["tristan@otierney.net", "tristan@apple.com"]),
158     Committer("Victor Wang", "victorw@chromium.org"),
159     Committer("Vitaly Repeshko", "vitalyr@chromium.org"),
160     Committer("William Siegrist", "wsiegrist@apple.com", "wms"),
161     Committer("Yael Aharon", "yael.aharon@nokia.com"),
162     Committer("Yaar Schnitman", ["yaar@chromium.org", "yaar@google.com"]),
163     Committer("Yong Li", ["yong.li@torchmobile.com", "yong.li.webkit@gmail.com"], "yong"),
164     Committer("Yongjun Zhang", "yongjun.zhang@nokia.com"),
165     Committer("Yuzo Fujishima", "yuzo@google.com", "yuzo"),
166     Committer("Zoltan Herczeg", "zherczeg@webkit.org", "zherczeg"),
167     Committer("Zoltan Horvath", "zoltan@webkit.org", "zoltan"),
168 ]
169
170
171 # This is intended as a canonical, machine-readable list of all reviewers for
172 # WebKit.  If your name is missing here and you are a reviewer, please add it.
173 # No review needed.
174
175
176 reviewers_list = [
177     Reviewer("Ada Chan", "adachan@apple.com", "chanada"),
178     Reviewer("Adam Barth", "abarth@webkit.org", "abarth"),
179     Reviewer("Adam Roben", "aroben@apple.com", "aroben"),
180     Reviewer("Adam Treat", ["treat@kde.org", "treat@webkit.org"], "manyoso"),
181     Reviewer("Adele Peterson", "adele@apple.com", "adele"),
182     Reviewer("Alexey Proskuryakov", ["ap@webkit.org", "ap@apple.com"], "ap"),
183     Reviewer("Alice Liu", "alice.liu@apple.com", "aliu"),
184     Reviewer("Alp Toker", ["alp@nuanti.com", "alp@atoker.com", "alp@webkit.org"], "alp"),
185     Reviewer("Anders Carlsson", ["andersca@apple.com", "acarlsson@apple.com"], "andersca"),
186     Reviewer("Antti Koivisto", ["koivisto@iki.fi", "antti@apple.com"], "anttik"),
187     Reviewer("Ariya Hidayat", ["ariya.hidayat@gmail.com", "ariya@webkit.org"], "ariya"),
188     Reviewer("Beth Dakin", "bdakin@apple.com", "dethbakin"),
189     Reviewer("Brady Eidson", "beidson@apple.com", "bradee-oh"),
190     Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
191     Reviewer("Chris Blumenberg", "cblu@apple.com", "cblu"),
192     Reviewer("Dan Bernstein", ["mitz@webkit.org", "mitz@apple.com"], "mitzpettel"),
193     Reviewer("Daniel Bates", "dbates@webkit.org", "dydz"),
194     Reviewer("Darin Adler", "darin@apple.com", "darin"),
195     Reviewer("Darin Fisher", ["fishd@chromium.org", "darin@chromium.org"], "fishd"),
196     Reviewer("David Harrison", "harrison@apple.com", "harrison"),
197     Reviewer("David Hyatt", "hyatt@apple.com", "hyatt"),
198     Reviewer("David Kilzer", ["ddkilzer@webkit.org", "ddkilzer@apple.com"], "ddkilzer"),
199     Reviewer("David Levin", "levin@chromium.org", "dave_levin"),
200     Reviewer("Dimitri Glazkov", "dglazkov@chromium.org", "dglazkov"),
201     Reviewer("Dirk Schulze", "krit@webkit.org", "krit"),
202     Reviewer("Dmitry Titov", "dimich@chromium.org", "dimich"),
203     Reviewer("Don Melton", "gramps@apple.com", "gramps"),
204     Reviewer("Eric Carlson", "eric.carlson@apple.com"),
205     Reviewer("Eric Seidel", "eric@webkit.org", "eseidel"),
206     Reviewer("Gavin Barraclough", "barraclough@apple.com", "gbarra"),
207     Reviewer("Geoffrey Garen", "ggaren@apple.com", "ggaren"),
208     Reviewer("George Staikos", ["staikos@kde.org", "staikos@webkit.org"]),
209     Reviewer("Gustavo Noronha Silva", ["gns@gnome.org", "kov@webkit.org"], "kov"),
210     Reviewer("Holger Freyther", ["zecke@selfish.org", "zecke@webkit.org"], "zecke"),
211     Reviewer("Jan Alonzo", ["jmalonzo@gmail.com", "jmalonzo@webkit.org"], "janm"),
212     Reviewer("Jeremy Orlow", "jorlow@chromium.org", "jorlow"),
213     Reviewer("Jian Li", "jianli@chromium.org", "jianli"),
214     Reviewer("John Sullivan", "sullivan@apple.com", "sullivan"),
215     Reviewer("Jon Honeycutt", "jhoneycutt@apple.com", "jhoneycutt"),
216     Reviewer("Joseph Pecoraro", "joepeck@webkit.org", "JoePeck"),
217     Reviewer("Justin Garcia", "justin.garcia@apple.com", "justing"),
218     Reviewer("Ken Kocienda", "kocienda@apple.com"),
219     Reviewer("Kenneth Rohde Christiansen", ["kenneth@webkit.org", "kenneth.christiansen@openbossa.org"], "kenne"),
220     Reviewer("Kevin Decker", "kdecker@apple.com", "superkevin"),
221     Reviewer("Kevin McCullough", "kmccullough@apple.com", "maculloch"),
222     Reviewer("Kevin Ollivier", ["kevino@theolliviers.com", "kevino@webkit.org"], "kollivier"),
223     Reviewer("Lars Knoll", ["lars@trolltech.com", "lars@kde.org"], "lars"),
224     Reviewer("Laszlo Gombos", "laszlo.1.gombos@nokia.com", "lgombos"),
225     Reviewer("Maciej Stachowiak", "mjs@apple.com", "othermaciej"),
226     Reviewer("Mark Rowe", "mrowe@apple.com", "bdash"),
227     Reviewer("Nate Chapin", "japhet@chromium.org", "natechapin"),
228     Reviewer("Nikolas Zimmermann", ["zimmermann@kde.org", "zimmermann@physik.rwth-aachen.de", "zimmermann@webkit.org"], "wildfox"),
229     Reviewer("Oliver Hunt", "oliver@apple.com", "olliej"),
230     Reviewer("Pavel Feldman", "pfeldman@chromium.org", "pfeldman"),
231     Reviewer("Richard Williamson", "rjw@apple.com", "rjw"),
232     Reviewer("Rob Buis", ["rwlbuis@gmail.com", "rwlbuis@webkit.org"], "rwlbuis"),
233     Reviewer("Sam Weinig", ["sam@webkit.org", "weinig@apple.com"], "weinig"),
234     Reviewer("Shinichiro Hamaji", "hamaji@chromium.org", "hamaji"),
235     Reviewer("Simon Fraser", "simon.fraser@apple.com", "smfr"),
236     Reviewer("Simon Hausmann", ["hausmann@webkit.org", "hausmann@kde.org", "simon.hausmann@nokia.com"], "tronical"),
237     Reviewer("Stephanie Lewis", "slewis@apple.com", "sundiamonde"),
238     Reviewer("Steve Falkenburg", "sfalken@apple.com", "sfalken"),
239     Reviewer("Tim Omernick", "timo@apple.com"),
240     Reviewer("Timothy Hatcher", ["timothy@hatcher.name", "timothy@apple.com"], "xenon"),
241     Reviewer(u'Tor Arne Vestb\xf8', "vestbo@webkit.org", "torarne"),
242     Reviewer("Vicki Murley", "vicki@apple.com"),
243     Reviewer("Xan Lopez", ["xan.lopez@gmail.com", "xan@gnome.org", "xan@webkit.org"], "xan"),
244     Reviewer("Yury Semikhatsky", "yurys@chromium.org", "yurys"),
245     Reviewer("Zack Rusin", "zack@kde.org", "zackr"),
246 ]
247
248
249 class CommitterList:
250
251     # Committers and reviewers are passed in to allow easy testing
252
253     def __init__(self,
254                  committers=committers_unable_to_review,
255                  reviewers=reviewers_list):
256         self._committers = committers + reviewers
257         self._reviewers = reviewers
258         self._committers_by_email = {}
259
260     def committers(self):
261         return self._committers
262
263     def reviewers(self):
264         return self._reviewers
265
266     def _email_to_committer_map(self):
267         if not len(self._committers_by_email):
268             for committer in self._committers:
269                 for email in committer.emails:
270                     self._committers_by_email[email] = committer
271         return self._committers_by_email
272
273     def committer_by_name(self, name):
274         # This could be made into a hash lookup if callers need it to be fast.
275         for committer in self.committers():
276             if committer.full_name == name:
277                 return committer
278
279     def committer_by_email(self, email):
280         return self._email_to_committer_map().get(email)
281
282     def reviewer_by_email(self, email):
283         committer = self.committer_by_email(email)
284         if committer and not committer.can_review:
285             return None
286         return committer