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