Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: commit-queue/verification/authors_white_list.py

Issue 135363007: Delete public commit queue to avoid confusion after move to internal repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « commit-queue/tools/watch.py ('k') | commit-queue/verification/base.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # coding=utf8
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5 """Ignores issues not passing a authors regex."""
6
7 import re
8
9 from verification import base
10
11
12 class AuthorVerifier(base.Verifier):
13 """Needs the author to match at least one regexp in self.regex."""
14 name = 'author_white_list'
15
16 def __init__(self, author_white_list):
17 super(AuthorVerifier, self).__init__()
18 self.author_white_list = author_white_list
19
20 def verify(self, pending):
21 if not any(re.match(r, pending.owner) for r in self.author_white_list):
22 pending.verifications[self.name] = base.SimpleStatus(
23 state=base.FAILED,
24 error_message='Can\'t commit because the owner %s not in whitelist' %
25 pending.owner)
26 else:
27 pending.verifications[self.name] = base.SimpleStatus(base.SUCCEEDED)
28
29 def update_status(self, queue):
30 pass
OLDNEW
« no previous file with comments | « commit-queue/tools/watch.py ('k') | commit-queue/verification/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698