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