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