|
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("Kent Hansen", "kent.hansen@nokia.com", "khansen"), |
|
137 Committer("Kinuko Yasuda", "kinuko@chromium.org", "kinuko"), |
|
138 Committer("Krzysztof Kowalczyk", "kkowalczyk@gmail.com"), |
|
139 Committer("Leandro Pereira", ["leandro@profusion.mobi", "leandro@webkit.org"], "acidx"), |
|
140 Committer("Levi Weintraub", "lweintraub@apple.com"), |
|
141 Committer("Luiz Agostini", ["luiz@webkit.org", "luiz.agostini@openbossa.org"], "lca"), |
|
142 Committer("Mads Ager", "ager@chromium.org"), |
|
143 Committer("Marcus Voltis Bulach", "bulach@chromium.org"), |
|
144 Committer("Matt Lilek", ["webkit@mattlilek.com", "pewtermoose@webkit.org"]), |
|
145 Committer("Matt Perry", "mpcomplete@chromium.org"), |
|
146 Committer("Maxime Britto", ["maxime.britto@gmail.com", "britto@apple.com"]), |
|
147 Committer("Maxime Simon", ["simon.maxime@gmail.com", "maxime.simon@webkit.org"], "maxime.simon"), |
|
148 Committer("Martin Robinson", ["mrobinson@igalia.com", "mrobinson@webkit.org", "martin.james.robinson@gmail.com"], "mrobinson"), |
|
149 Committer("Michelangelo De Simone", "michelangelo@webkit.org", "michelangelo"), |
|
150 Committer("Mike Belshe", ["mbelshe@chromium.org", "mike@belshe.com"]), |
|
151 Committer("Mike Fenton", ["mifenton@rim.com", "mike.fenton@torchmobile.com"], "mfenton"), |
|
152 Committer("Mike Thole", ["mthole@mikethole.com", "mthole@apple.com"]), |
|
153 Committer("Mikhail Naganov", "mnaganov@chromium.org"), |
|
154 Committer("MORITA Hajime", "morrita@google.com", "morrita"), |
|
155 Committer("Nico Weber", ["thakis@chromium.org", "thakis@google.com"], "thakis"), |
|
156 Committer("Pam Greene", "pam@chromium.org", "pamg"), |
|
157 Committer("Peter Kasting", ["pkasting@google.com", "pkasting@chromium.org"], "pkasting"), |
|
158 Committer("Philippe Normand", ["pnormand@igalia.com", "philn@webkit.org"], "philn-tp"), |
|
159 Committer("Pierre d'Herbemont", ["pdherbemont@free.fr", "pdherbemont@apple.com"], "pdherbemont"), |
|
160 Committer("Pierre-Olivier Latour", "pol@apple.com", "pol"), |
|
161 Committer("Robert Hogan", ["robert@webkit.org", "robert@roberthogan.net"], "mwenge"), |
|
162 Committer("Roland Steiner", "rolandsteiner@chromium.org"), |
|
163 Committer("Ryosuke Niwa", "rniwa@webkit.org", "rniwa"), |
|
164 Committer("Scott Violet", "sky@chromium.org", "sky"), |
|
165 Committer("Stephen White", "senorblanco@chromium.org", "senorblanco"), |
|
166 Committer("Tony Chang", "tony@chromium.org", "tony^work"), |
|
167 Committer("Tony Gentilcore", "tonyg@chromium.org", "tonyg-cr"), |
|
168 Committer("Trey Matteson", "trey@usa.net", "trey"), |
|
169 Committer("Tristan O'Tierney", ["tristan@otierney.net", "tristan@apple.com"]), |
|
170 Committer("Victor Wang", "victorw@chromium.org", "victorw"), |
|
171 Committer("Vitaly Repeshko", "vitalyr@chromium.org"), |
|
172 Committer("William Siegrist", "wsiegrist@apple.com", "wms"), |
|
173 Committer("Xiaomei Ji", "xji@chromium.org", "xji"), |
|
174 Committer("Yael Aharon", "yael.aharon@nokia.com"), |
|
175 Committer("Yaar Schnitman", ["yaar@chromium.org", "yaar@google.com"]), |
|
176 Committer("Yong Li", ["yong.li.webkit@gmail.com", "yong.li@torchmobile.com"], "yong"), |
|
177 Committer("Yongjun Zhang", "yongjun.zhang@nokia.com"), |
|
178 Committer("Yuzo Fujishima", "yuzo@google.com", "yuzo"), |
|
179 Committer("Zhenyao Mo", "zmo@google.com", "zhenyao"), |
|
180 Committer("Zoltan Herczeg", "zherczeg@webkit.org", "zherczeg"), |
|
181 Committer("Zoltan Horvath", "zoltan@webkit.org", "zoltan"), |
|
182 ] |
|
183 |
|
184 |
|
185 # This is intended as a canonical, machine-readable list of all reviewers for |
|
186 # WebKit. If your name is missing here and you are a reviewer, please add it. |
|
187 # No review needed. |
|
188 |
|
189 |
|
190 reviewers_list = [ |
|
191 Reviewer("Ada Chan", "adachan@apple.com", "chanada"), |
|
192 Reviewer("Adam Barth", "abarth@webkit.org", "abarth"), |
|
193 Reviewer("Adam Roben", "aroben@apple.com", "aroben"), |
|
194 Reviewer("Adam Treat", ["treat@kde.org", "treat@webkit.org"], "manyoso"), |
|
195 Reviewer("Adele Peterson", "adele@apple.com", "adele"), |
|
196 Reviewer("Alexey Proskuryakov", ["ap@webkit.org", "ap@apple.com"], "ap"), |
|
197 Reviewer("Alice Liu", "alice.liu@apple.com", "aliu"), |
|
198 Reviewer("Alp Toker", ["alp@nuanti.com", "alp@atoker.com", "alp@webkit.org"], "alp"), |
|
199 Reviewer("Anders Carlsson", ["andersca@apple.com", "acarlsson@apple.com"], "andersca"), |
|
200 Reviewer("Antonio Gomes", "tonikitoo@webkit.org", "tonikitoo"), |
|
201 Reviewer("Antti Koivisto", ["koivisto@iki.fi", "antti@apple.com"], "anttik"), |
|
202 Reviewer("Ariya Hidayat", ["ariya.hidayat@gmail.com", "ariya@webkit.org"], "ariya"), |
|
203 Reviewer("Beth Dakin", "bdakin@apple.com", "dethbakin"), |
|
204 Reviewer("Brady Eidson", "beidson@apple.com", "bradee-oh"), |
|
205 Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]), |
|
206 Reviewer("Chris Blumenberg", "cblu@apple.com", "cblu"), |
|
207 Reviewer("Chris Fleizach", "cfleizach@apple.com", "cfleizach"), |
|
208 Reviewer("Chris Jerdonek", "cjerdonek@webkit.org", "cjerdonek"), |
|
209 Reviewer("Dan Bernstein", ["mitz@webkit.org", "mitz@apple.com"], "mitzpettel"), |
|
210 Reviewer("Daniel Bates", "dbates@webkit.org", "dydz"), |
|
211 Reviewer("Darin Adler", "darin@apple.com", "darin"), |
|
212 Reviewer("Darin Fisher", ["fishd@chromium.org", "darin@chromium.org"], "fishd"), |
|
213 Reviewer("David Harrison", "harrison@apple.com", "harrison"), |
|
214 Reviewer("David Hyatt", "hyatt@apple.com", "hyatt"), |
|
215 Reviewer("David Kilzer", ["ddkilzer@webkit.org", "ddkilzer@apple.com"], "ddkilzer"), |
|
216 Reviewer("David Levin", "levin@chromium.org", "dave_levin"), |
|
217 Reviewer("Dimitri Glazkov", "dglazkov@chromium.org", "dglazkov"), |
|
218 Reviewer("Dirk Schulze", "krit@webkit.org", "krit"), |
|
219 Reviewer("Dmitry Titov", "dimich@chromium.org", "dimich"), |
|
220 Reviewer("Don Melton", "gramps@apple.com", "gramps"), |
|
221 Reviewer("Dumitru Daniliuc", "dumi@chromium.org", "dumi"), |
|
222 Reviewer("Eric Carlson", "eric.carlson@apple.com"), |
|
223 Reviewer("Eric Seidel", "eric@webkit.org", "eseidel"), |
|
224 Reviewer("Gavin Barraclough", "barraclough@apple.com", "gbarra"), |
|
225 Reviewer("Geoffrey Garen", "ggaren@apple.com", "ggaren"), |
|
226 Reviewer("George Staikos", ["staikos@kde.org", "staikos@webkit.org"]), |
|
227 Reviewer("Gustavo Noronha Silva", ["gns@gnome.org", "kov@webkit.org"], "kov"), |
|
228 Reviewer("Holger Freyther", ["zecke@selfish.org", "zecke@webkit.org"], "zecke"), |
|
229 Reviewer("Jan Alonzo", ["jmalonzo@gmail.com", "jmalonzo@webkit.org"], "janm"), |
|
230 Reviewer("Jeremy Orlow", "jorlow@chromium.org", "jorlow"), |
|
231 Reviewer("Jian Li", "jianli@chromium.org", "jianli"), |
|
232 Reviewer("John Sullivan", "sullivan@apple.com", "sullivan"), |
|
233 Reviewer("Jon Honeycutt", "jhoneycutt@apple.com", "jhoneycutt"), |
|
234 Reviewer("Joseph Pecoraro", "joepeck@webkit.org", "JoePeck"), |
|
235 Reviewer("Justin Garcia", "justin.garcia@apple.com", "justing"), |
|
236 Reviewer("Ken Kocienda", "kocienda@apple.com"), |
|
237 Reviewer("Kenneth Rohde Christiansen", ["kenneth@webkit.org", "kenneth.christiansen@openbossa.org"], "kenne"), |
|
238 Reviewer("Kent Tamura", "tkent@chromium.org", "tkent"), |
|
239 Reviewer("Kevin Decker", "kdecker@apple.com", "superkevin"), |
|
240 Reviewer("Kevin McCullough", "kmccullough@apple.com", "maculloch"), |
|
241 Reviewer("Kevin Ollivier", ["kevino@theolliviers.com", "kevino@webkit.org"], "kollivier"), |
|
242 Reviewer("Lars Knoll", ["lars@trolltech.com", "lars@kde.org"], "lars"), |
|
243 Reviewer("Laszlo Gombos", "laszlo.1.gombos@nokia.com", "lgombos"), |
|
244 Reviewer("Maciej Stachowiak", "mjs@apple.com", "othermaciej"), |
|
245 Reviewer("Mark Rowe", "mrowe@apple.com", "bdash"), |
|
246 Reviewer("Nate Chapin", "japhet@chromium.org", "japhet"), |
|
247 Reviewer("Nikolas Zimmermann", ["zimmermann@kde.org", "zimmermann@physik.rwth-aachen.de", "zimmermann@webkit.org"], "wildfox"), |
|
248 Reviewer("Ojan Vafai", "ojan@chromium.org", "ojan"), |
|
249 Reviewer("Oliver Hunt", "oliver@apple.com", "olliej"), |
|
250 Reviewer("Pavel Feldman", "pfeldman@chromium.org", "pfeldman"), |
|
251 Reviewer("Richard Williamson", "rjw@apple.com", "rjw"), |
|
252 Reviewer("Rob Buis", ["rwlbuis@gmail.com", "rwlbuis@webkit.org"], "rwlbuis"), |
|
253 Reviewer("Sam Weinig", ["sam@webkit.org", "weinig@apple.com"], "weinig"), |
|
254 Reviewer("Shinichiro Hamaji", "hamaji@chromium.org", "hamaji"), |
|
255 Reviewer("Simon Fraser", "simon.fraser@apple.com", "smfr"), |
|
256 Reviewer("Simon Hausmann", ["hausmann@webkit.org", "hausmann@kde.org", "simon.hausmann@nokia.com"], "tronical"), |
|
257 Reviewer("Stephanie Lewis", "slewis@apple.com", "sundiamonde"), |
|
258 Reviewer("Steve Block", "steveblock@google.com", "steveblock"), |
|
259 Reviewer("Steve Falkenburg", "sfalken@apple.com", "sfalken"), |
|
260 Reviewer("Tim Omernick", "timo@apple.com"), |
|
261 Reviewer("Timothy Hatcher", ["timothy@hatcher.name", "timothy@apple.com"], "xenon"), |
|
262 Reviewer(u"Tor Arne Vestb\u00f8", ["vestbo@webkit.org", "tor.arne.vestbo@nokia.com"], "torarne"), |
|
263 Reviewer("Vicki Murley", "vicki@apple.com"), |
|
264 Reviewer("Xan Lopez", ["xan.lopez@gmail.com", "xan@gnome.org", "xan@webkit.org"], "xan"), |
|
265 Reviewer("Yury Semikhatsky", "yurys@chromium.org", "yurys"), |
|
266 Reviewer("Zack Rusin", "zack@kde.org", "zackr"), |
|
267 ] |
|
268 |
|
269 |
|
270 class CommitterList: |
|
271 |
|
272 # Committers and reviewers are passed in to allow easy testing |
|
273 |
|
274 def __init__(self, |
|
275 committers=committers_unable_to_review, |
|
276 reviewers=reviewers_list): |
|
277 self._committers = committers + reviewers |
|
278 self._reviewers = reviewers |
|
279 self._committers_by_email = {} |
|
280 |
|
281 def committers(self): |
|
282 return self._committers |
|
283 |
|
284 def reviewers(self): |
|
285 return self._reviewers |
|
286 |
|
287 def _email_to_committer_map(self): |
|
288 if not len(self._committers_by_email): |
|
289 for committer in self._committers: |
|
290 for email in committer.emails: |
|
291 self._committers_by_email[email] = committer |
|
292 return self._committers_by_email |
|
293 |
|
294 def committer_by_name(self, name): |
|
295 # This could be made into a hash lookup if callers need it to be fast. |
|
296 for committer in self.committers(): |
|
297 if committer.full_name == name: |
|
298 return committer |
|
299 |
|
300 def committer_by_email(self, email): |
|
301 return self._email_to_committer_map().get(email) |
|
302 |
|
303 def reviewer_by_email(self, email): |
|
304 committer = self.committer_by_email(email) |
|
305 if committer and not committer.can_review: |
|
306 return None |
|
307 return committer |