aboutsummaryrefslogtreecommitdiff
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2020-05-21 21:03:05 +0000
committerChromium commit bot <commit-bot@chromium.org>2020-05-21 21:03:05 +0000
commit71e26734d279b03e9e3ce8d1544ca2ea2a30e239 (patch)
treeb0acb35bea841bbed4fc3bbe163ac482a520d994 /PRESUBMIT.py
parent804a0e3561f62000edde5989f3694c34b24cc9a3 (diff)
downloadpdfium-71e26734d279b03e9e3ce8d1544ca2ea2a30e239.tar.gz
Add a presubmit check for AUTHORS.
Make sure CL authors are in AUTHORS. The presubmit check is the same as Chromium's, but with a different list of known robot accounts. Change-Id: I0d126e3fbb0cdf98f857d1e74f6889a04514304f Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70091 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index cf9a196f8..f87de6dd6 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -34,6 +34,11 @@ _INCLUDE_ORDER_WARNING = (
'cppguide.html#Names_and_Order_of_Includes')
+# Bypass the AUTHORS check for these accounts.
+_KNOWN_ROBOTS = set() | set(
+ '%s@skia-public.iam.gserviceaccount.com' % s for s in ('pdfium-autoroll',))
+
+
def _CheckUnwantedDependencies(input_api, output_api):
"""Runs checkdeps on #include statements added in this
change. Breaking - rules is an error, breaking ! rules is a
@@ -323,6 +328,11 @@ def CheckChangeOnUpload(input_api, output_api):
results.extend(_CheckTestDuplicates(input_api, output_api))
results.extend(_CheckPNGFormat(input_api, output_api))
+ author = input_api.change.author_email
+ if author and author not in _KNOWN_ROBOTS:
+ results.extend(
+ input_api.canned_checks.CheckAuthorizedAuthor(input_api, output_api))
+
for f in input_api.AffectedFiles():
path, name = input_api.os_path.split(f.LocalPath())
if name == 'PRESUBMIT.py':