Commit 621fe6f9 authored by Sergiy Byelozyorov's avatar Sergiy Byelozyorov Committed by Commit Bot

Add ability to whitelist bot accounts as valid authors

Example usage: https://crrev.com/c/1074367

R=machenbach@chromium.org

Bug: 831171
Change-Id: Ic3deff5040a268e10161ccce635f06b7f8c08d36
Reviewed-on: https://chromium-review.googlesource.com/1074368Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
parent 0ae14e9a
......@@ -80,7 +80,7 @@ def CheckChangeWasUploaded(input_api, output_api):
### Content checks
def CheckAuthorizedAuthor(input_api, output_api):
def CheckAuthorizedAuthor(input_api, output_api, bot_whitelist=None):
"""For non-googler/chromites committers, verify the author's email address is
in AUTHORS.
"""
......@@ -93,6 +93,11 @@ def CheckAuthorizedAuthor(input_api, output_api):
if not author:
input_api.logging.info('No author, skipping AUTHOR check')
return []
# This is used for CLs created by trusted robot accounts.
if bot_whitelist and author in bot_whitelist:
return []
authors_path = input_api.os_path.join(
input_api.PresubmitLocalPath(), 'AUTHORS')
valid_authors = (
......
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