Commit 590420d5 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Make authors-check error out instead of warn on commit

Bug: 775854
Change-Id: I6f831a2536de3cadbeaede7b78cfcf7d41f77052
Reviewed-on: https://chromium-review.googlesource.com/725328Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
parent f6a58809
......@@ -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 '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment