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