diff options
author | Lei Zhang <thestig@chromium.org> | 2020-05-21 21:03:05 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2020-05-21 21:03:05 +0000 |
commit | 71e26734d279b03e9e3ce8d1544ca2ea2a30e239 (patch) | |
tree | b0acb35bea841bbed4fc3bbe163ac482a520d994 /PRESUBMIT.py | |
parent | 804a0e3561f62000edde5989f3694c34b24cc9a3 (diff) | |
download | pdfium-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.py | 10 |
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': |