From 1eec99cf9434f1361c0c355ea0e26e86729df199 Mon Sep 17 00:00:00 2001 From: Eric Boren Date: Thu, 26 Apr 2018 13:09:48 -0400 Subject: AUTHORS check: Allow service accounts from skia-swarming-bots Bug: skia:7833, skia:7050 Change-Id: Id5b3fdd1b0a4ae50fce7a5d1212c744a85274012 Reviewed-on: https://skia-review.googlesource.com/123936 Reviewed-by: Ravi Mistry Commit-Queue: Eric Boren --- PRESUBMIT.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'PRESUBMIT.py') diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 0a2aa8e267..94a4bce7b6 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -60,7 +60,9 @@ PATH_PREFIX_TO_EXTRA_TRYBOTS = { # 'src/image/SkImage_Base.h': 'master5:pqr,stu;master1:abc1;master2:def', } -SERVICE_ACCOUNT_SUFFIX = '@skia-buildbots.google.com.iam.gserviceaccount.com' +SERVICE_ACCOUNT_SUFFIX = [ + '@%s.google.com.iam.gserviceaccount.com' % project for project in [ + 'skia-buildbots', 'skia-swarming-bots']] def _CheckChangeHasEol(input_api, output_api, source_file_filter=None): @@ -364,8 +366,9 @@ def _CheckOwnerIsInAuthorsFile(input_api, output_api): owner_email = cr.GetOwnerEmail() # Service accounts don't need to be in AUTHORS. - if owner_email.endswith(SERVICE_ACCOUNT_SUFFIX): - return results + for suffix in SERVICE_ACCOUNT_SUFFIX: + if owner_email.endswith(suffix): + return results try: authors_content = '' -- cgit v1.2.3