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