committers.py 12.7 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (c) 2009, Google Inc. All rights reserved.
# 
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# 
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
# 
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# WebKit's Python module for committer and reviewer validation

class Committer:
32
    def __init__(self, name, email_or_emails):
33
        self.full_name = name
34
35
36
37
        if isinstance(email_or_emails, str):
            self.emails = [email_or_emails]
        else:
            self.emails = email_or_emails
38
39
        self.can_review = False

40
41
42
43
    # FIXME: We're assuming the first email is a valid bugzilla email, which might not be right.
    def bugzilla_email(self):
        return self.emails[0]

44
    def __str__(self):
45
        return '"%s" <%s>' % (self.full_name, self.emails[0])
46
47

class Reviewer(Committer):
48
49
    def __init__(self, name, email_or_emails):
        Committer.__init__(self, name, email_or_emails)
50
51
        self.can_review = True

52
# This is intended as a canonical, machine-readable list of all non-reviewer committers for WebKit.
53
54
# If your name is missing here and you are a committer, please add it.  No review needed.
# All reviewers are committers, so this list is only of committers who are not reviewers.
55
committers_unable_to_review = [
56
    Committer("Aaron Boodman", "aa@chromium.org"),
57
    Committer("Adam Langley", "agl@chromium.org"),
58
    Committer("Albert J. Wong", "ajwong@chromium.org"),
59
60
61
    Committer("Alexander Kellett", ["lypanov@mac.com", "a-lists001@lypanov.net", "lypanov@kde.org"]),
    Committer("Andre Boule", "aboule@apple.com"),
    Committer("Andrew Wellington", ["andrew@webkit.org", "proton@wiretapped.net"]),
62
    Committer("Anthony Ricaud", "rik@webkit.org"),
63
    Committer("Anton Muhin", "antonm@chromium.org"),
64
    Committer("Antonio Gomes", "tonikitoo@webkit.org"),
65
    Committer("Ben Murdoch", "benm@google.com"),
66
    Committer("Benjamin C Meyer", ["ben@meyerhome.net", "ben@webkit.org"]),
67
    Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"]),
bfulgham@webkit.org's avatar
bfulgham@webkit.org committed
68
    Committer("Brent Fulgham", "bfulgham@webkit.org"),
69
    Committer("Brett Wilson", "brettw@chromium.org"),
70
    Committer("Brian Weinstein", "bweinstein@apple.com"),
cam@webkit.org's avatar
cam@webkit.org committed
71
    Committer("Cameron McCormack", "cam@webkit.org"),
72
    Committer("Chris Fleizach", "cfleizach@apple.com"),
73
    Committer("Chris Marrin", "cmarrin@apple.com"),
74
75
    Committer("Chris Petersen", "cpetersen@apple.com"),
    Committer("Christian Dywan", ["christian@twotoasts.de", "christian@webkit.org"]),
76
    Committer("Collin Jackson", "collinj@webkit.org"),
77
    Committer("Csaba Osztrogonac", "ossy@webkit.org"),
78
    Committer("Daniel Bates", "dbates@webkit.org"),
79
    Committer("David Smith", ["catfish.man@gmail.com", "dsmith@webkit.org"]),
80
    Committer("Dean Jackson", "dino@apple.com"),
81
    Committer("Drew Wilson", "atwilson@chromium.org"),
82
    Committer("Dumitru Daniliuc", "dumi@chromium.org"),
83
    Committer("Eli Fidler", "eli@staikos.net"),
84
    Committer("Enrica Casucci", "enrica@apple.com"),
85
    Committer("Erik Arvidsson", "arv@chromium.org"),
86
    Committer("Eric Roman", "eroman@chromium.org"),
87
    Committer("Feng Qian", "feng@chromium.org"),
88
    Committer("Fumitoshi Ukai", "ukai@chromium.org"),
89
    Committer("Gabor Loki", "loki@webkit.org"),
90
    Committer("Girish Ramakrishnan", ["girish@forwardbias.in", "ramakrishnan.girish@gmail.com"]),
91
    Committer("Graham Dennis", ["Graham.Dennis@gmail.com", "gdennis@webkit.org"]),
bolsinga@apple.com's avatar
bolsinga@apple.com committed
92
    Committer("Greg Bolsinga", "bolsinga@apple.com"),
93
94
    Committer("Hin-Chung Lam", ["hclam@google.com", "hclam@chromium.org"]),
    Committer("Jens Alfke", ["snej@chromium.org", "jens@apple.com"]),
95
    Committer("Jeremy Moskovich", ["playmobil@google.com", "jeremy@chromium.org"]),
96
    Committer("Jeremy Orlow", "jorlow@chromium.org"),
97
    Committer("Jessie Berlin", ["jberlin@webkit.org", "jberlin@apple.com"]),
98
99
    Committer("Jian Li", "jianli@chromium.org"),
    Committer("John Abd-El-Malek", "jam@chromium.org"),
100
    Committer("Joost de Valk", ["joost@webkit.org", "webkit-dev@joostdevalk.nl"]),
101
    Committer("Joseph Pecoraro", "joepeck@webkit.org"),
102
    Committer("Julie Parent", ["jparent@google.com", "jparent@chromium.org"]),
103
    Committer("Julien Chaffraix", ["jchaffraix@webkit.org", "julien.chaffraix@gmail.com"]),
104
    Committer("Jungshik Shin", "jshin@chromium.org"),
105
    Committer("Keishi Hattori", "keishi@webkit.org"),
106
    Committer("Kelly Norton", "knorton@google.com"),
tkent@chromium.org's avatar
tkent@chromium.org committed
107
    Committer("Kent Tamura", "tkent@chromium.org"),
108
109
    Committer("Krzysztof Kowalczyk", "kkowalczyk@gmail.com"),
    Committer("Levi Weintraub", "lweintraub@apple.com"),
110
    Committer("Mads Ager", "ager@chromium.org"),
111
    Committer("Matt Lilek", ["webkit@mattlilek.com", "pewtermoose@webkit.org"]),
112
    Committer("Matt Perry", "mpcomplete@chromium.org"),
113
114
    Committer("Maxime Britto", ["maxime.britto@gmail.com", "britto@apple.com"]),
    Committer("Maxime Simon", ["simon.maxime@gmail.com", "maxime.simon@webkit.org"]),
115
    Committer("Michelangelo De Simone", "michelangelo@webkit.org"),
116
    Committer("Mike Belshe", ["mbelshe@chromium.org", "mike@belshe.com"]),
117
118
    Committer("Mike Fenton", ["mike.fenton@torchmobile.com", "mifenton@rim.com"]),
    Committer("Mike Thole", ["mthole@mikethole.com", "mthole@apple.com"]),
119
    Committer("Nate Chapin", "japhet@chromium.org"),
jparent@chromium.org's avatar
jparent@chromium.org committed
120
    Committer("Ojan Vafai", "ojan@chromium.org"),
121
    Committer("Pam Greene", "pam@chromium.org"),
122
    Committer("Peter Kasting", ["pkasting@google.com", "pkasting@chromium.org"]),
123
    Committer("Philippe Normand", ["pnormand@igalia.com", "philn@webkit.org"]),
124
    Committer("Pierre d'Herbemont", ["pdherbemont@free.fr", "pdherbemont@apple.com"]),
125
    Committer("Pierre-Olivier Latour", "pol@apple.com"),
126
    Committer("Roland Steiner", "rolandsteiner@chromium.org"),
rniwa@webkit.org's avatar
rniwa@webkit.org committed
127
    Committer("Ryosuke Niwa", "rniwa@webkit.org"),
128
    Committer("Scott Violet", "sky@chromium.org"),
hamaji@chromium.org's avatar
hamaji@chromium.org committed
129
    Committer("Shinichiro Hamaji", "hamaji@chromium.org"),
senorblanco@chromium.org's avatar
senorblanco@chromium.org committed
130
    Committer("Stephen White", "senorblanco@chromium.org"),
131
    Committer("Steve Block", "steveblock@google.com"),
132
    Committer("Tony Chang", "tony@chromium.org"),
133
134
    Committer("Trey Matteson", "trey@usa.net"),
    Committer("Tristan O'Tierney", ["tristan@otierney.net", "tristan@apple.com"]),
135
    Committer("William Siegrist", "wsiegrist@apple.com"),
yael.aharon@nokia.com's avatar
yael.aharon@nokia.com committed
136
    Committer("Yael Aharon", "yael.aharon@nokia.com"),
137
    Committer("Yaar Schnitman", ["yaar@chromium.org", "yaar@google.com"]),
138
    Committer("Yong Li", ["yong.li@torchmobile.com", "yong.li.webkit@gmail.com"]),
139
    Committer("Yongjun Zhang", "yongjun.zhang@nokia.com"),
140
    Committer("Yury Semikhatsky", "yurys@chromium.org"),
zoltan@webkit.org's avatar
zoltan@webkit.org committed
141
    Committer("Zoltan Horvath", "zoltan@webkit.org"),
142
143
]

144
# This is intended as a canonical, machine-readable list of all reviewers for WebKit.
145
# If your name is missing here and you are a reviewer, please add it.  No review needed.
146
reviewers_list = [
147
    Reviewer("Ada Chan", "adachan@apple.com"),
148
    Reviewer("Adam Barth", "abarth@webkit.org"),
149
    Reviewer("Adam Roben", "aroben@apple.com"),
150
    Reviewer("Adam Treat", ["treat@kde.org", "treat@webkit.org"]),
151
    Reviewer("Adele Peterson", "adele@apple.com"),
152
    Reviewer("Alexey Proskuryakov", ["ap@webkit.org", "ap@apple.com"]),
153
    Reviewer("Alice Liu", "alice.liu@apple.com"),
154
155
156
    Reviewer("Alp Toker", ["alp@nuanti.com", "alp@atoker.com", "alp@webkit.org"]),
    Reviewer("Anders Carlsson", ["andersca@apple.com", "acarlsson@apple.com"]),
    Reviewer("Antti Koivisto", ["koivisto@iki.fi", "antti@apple.com"]),
157
    Reviewer("Ariya Hidayat", ["ariya.hidayat@gmail.com", "ariya@webkit.org"]),
158
    Reviewer("Beth Dakin", "bdakin@apple.com"),
159
    Reviewer("Brady Eidson", "beidson@apple.com"),
160
    Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
161
    Reviewer("Chris Blumenberg", "cblu@apple.com"),
162
    Reviewer("Dan Bernstein", ["mitz@webkit.org", "mitz@apple.com"]),
163
    Reviewer("Darin Adler", "darin@apple.com"),
164
    Reviewer("Darin Fisher", ["fishd@chromium.org", "darin@chromium.org"]),
165
    Reviewer("David Harrison", "harrison@apple.com"),
166
    Reviewer("David Hyatt", "hyatt@apple.com"),
167
    Reviewer("David Kilzer", ["ddkilzer@webkit.org", "ddkilzer@apple.com"]),
168
169
    Reviewer("David Levin", "levin@chromium.org"),
    Reviewer("Dimitri Glazkov", "dglazkov@chromium.org"),
170
    Reviewer("Dirk Schulze", "krit@webkit.org"),
171
    Reviewer("Dmitry Titov", "dimich@chromium.org"),
172
    Reviewer("Don Melton", "gramps@apple.com"),
173
    Reviewer("Eric Carlson", "eric.carlson@apple.com"),
174
175
    Reviewer("Eric Seidel", "eric@webkit.org"),
    Reviewer("Gavin Barraclough", "barraclough@apple.com"),
176
    Reviewer("Geoffrey Garen", "ggaren@apple.com"),
177
178
179
180
    Reviewer("George Staikos", ["staikos@kde.org", "staikos@webkit.org"]),
    Reviewer("Gustavo Noronha Silva", ["gns@gnome.org", "kov@webkit.org"]),
    Reviewer("Holger Freyther", ["zecke@selfish.org", "zecke@webkit.org"]),
    Reviewer("Jan Alonzo", ["jmalonzo@gmail.com", "jmalonzo@webkit.org"]),
sullivan@apple.com's avatar
sullivan@apple.com committed
181
    Reviewer("John Sullivan", "sullivan@apple.com"),
182
    Reviewer("Jon Honeycutt", "jhoneycutt@apple.com"),
183
    Reviewer("Justin Garcia", "justin.garcia@apple.com"),
184
    Reviewer("Ken Kocienda", "kocienda@apple.com"),
185
    Reviewer("Kenneth Rohde Christiansen", ["kenneth@webkit.org", "kenneth.christiansen@openbossa.org"]),
186
    Reviewer("Kevin Decker", "kdecker@apple.com"),
187
    Reviewer("Kevin McCullough", "kmccullough@apple.com"),
188
189
    Reviewer("Kevin Ollivier", ["kevino@theolliviers.com", "kevino@webkit.org"]),
    Reviewer("Lars Knoll", ["lars@trolltech.com", "lars@kde.org"]),
190
    Reviewer("Laszlo Gombos", "laszlo.1.gombos@nokia.com"),
191
192
    Reviewer("Maciej Stachowiak", "mjs@apple.com"),
    Reviewer("Mark Rowe", "mrowe@apple.com"),
193
    Reviewer("Nikolas Zimmermann", ["zimmermann@kde.org", "zimmermann@physik.rwth-aachen.de", "zimmermann@webkit.org"]),
194
    Reviewer("Oliver Hunt", "oliver@apple.com"),
195
    Reviewer("Pavel Feldman", "pfeldman@chromium.org"),
196
    Reviewer("Richard Williamson", "rjw@apple.com"),
197
198
    Reviewer("Rob Buis", ["rwlbuis@gmail.com", "rwlbuis@webkit.org"]),
    Reviewer("Sam Weinig", ["sam@webkit.org", "weinig@apple.com"]),
199
    Reviewer("Simon Fraser", "simon.fraser@apple.com"),
200
    Reviewer("Simon Hausmann", ["hausmann@webkit.org", "hausmann@kde.org"]),
201
    Reviewer("Stephanie Lewis", "slewis@apple.com"),
202
    Reviewer("Steve Falkenburg", "sfalken@apple.com"),
203
    Reviewer("Tim Omernick", "timo@apple.com"),
204
    Reviewer("Timothy Hatcher", ["timothy@hatcher.name", "timothy@apple.com"]),
205
    Reviewer(u'Tor Arne Vestb\xf8', "vestbo@webkit.org"),
206
    Reviewer("Vicki Murley", "vicki@apple.com"),
207
    Reviewer("Xan Lopez", ["xan.lopez@gmail.com", "xan@gnome.org", "xan@webkit.org"]),
208
    Reviewer("Zack Rusin", "zack@kde.org"),
209
210
211
212
213
214
215
216
217
218
219
220
221
]


class CommitterList:
    # Committers and reviewers are passed in to allow easy testing
    def __init__(self, committers=committers_unable_to_review, reviewers=reviewers_list):
        self._committers = committers + reviewers
        self._reviewers = reviewers
        self._committers_by_email = {}

    def committers(self):
        return self._committers

222
223
224
    def reviewers(self):
        return self._reviewers

225
226
227
    def _email_to_committer_map(self):
        if not len(self._committers_by_email):
            for committer in self._committers:
228
229
                for email in committer.emails:
                    self._committers_by_email[email] = committer
230
231
        return self._committers_by_email

232
233
    def committer_by_email(self, email):
        return self._email_to_committer_map().get(email)
234

235
236
    def reviewer_by_email(self, email):
        committer = self.committer_by_email(email)
237
238
        if committer and not committer.can_review:
            return None
239
        return committer