diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-13 20:43:01 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-13 20:43:01 +0000 |
commit | 9bb9cb8156148dc3c23c9c2b8cd1fb07014a698a (patch) | |
tree | 96fed1e4d010f926c824624d8b5a41c7f10bd89f /PRESUBMIT.py | |
parent | 20661f72411d1ab29f6967c2f3c31b91ff4e4c91 (diff) | |
download | chromium_src-9bb9cb8156148dc3c23c9c2b8cd1fb07014a698a.zip chromium_src-9bb9cb8156148dc3c23c9c2b8cd1fb07014a698a.tar.gz chromium_src-9bb9cb8156148dc3c23c9c2b8cd1fb07014a698a.tar.bz2 |
Allow wildcard for corporate CLA. Add nvidia to AUTHORS.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7003151
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r-- | PRESUBMIT.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index eafb77a..6fface8 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -96,9 +96,12 @@ def _CheckAuthorizedAuthor(input_api, output_api): """For non-googler/chromites committers, verify the author's email address is in AUTHORS. """ + # TODO(maruel): Add it to input_api? + import fnmatch + author = input_api.change.author_email - if (author is None or author.endswith('@chromium.org') or - author.endswith('@google.com')): + if not author: + input_api.logging.info('No author, skipping AUTHOR check') return [] authors_path = input_api.os_path.join( input_api.PresubmitLocalPath(), 'AUTHORS') @@ -106,7 +109,11 @@ def _CheckAuthorizedAuthor(input_api, output_api): input_api.re.match(r'[^#]+\s+\<(.+?)\>\s*$', line) for line in open(authors_path)) valid_authors = [item.group(1).lower() for item in valid_authors if item] - if not author.lower() in valid_authors: + if input_api.verbose: + print 'Valid authors are %s' % ', '.join(valid_authors) + if not any( + True for valid in valid_authors + if fnmatch.fnmatch(author.lower(), valid)): return [output_api.PresubmitPromptWarning( ('%s is not in AUTHORS file. If you are a new contributor, please visit' '\n' |