Make authors-check error out instead of warn on commit

Bug: 775854
Change-Id: I6f831a2536de3cadbeaede7b78cfcf7d41f77052
Reviewed-on: https://chromium-review.googlesource.com/725328
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
changes/28/725328/3
Michael Achenbach 8 years ago committed by Commit Bot
parent f6a588095f
commit 590420d5d4

@ -84,6 +84,11 @@ def CheckAuthorizedAuthor(input_api, output_api):
"""For non-googler/chromites committers, verify the author's email address is
in AUTHORS.
"""
if input_api.is_committing:
error_type = output_api.PresubmitError
else:
error_type = output_api.PresubmitPromptWarning
author = input_api.change.author_email
if not author:
input_api.logging.info('No author, skipping AUTHOR check')
@ -97,7 +102,7 @@ def CheckAuthorizedAuthor(input_api, output_api):
if not any(input_api.fnmatch.fnmatch(author.lower(), valid)
for valid in valid_authors):
input_api.logging.info('Valid authors are %s', ', '.join(valid_authors))
return [output_api.PresubmitPromptWarning(
return [error_type(
('%s is not in AUTHORS file. If you are a new contributor, please visit'
'\n'
'https://www.chromium.org/developers/contributing-code and read the '

Loading…
Cancel
Save