aboutsummaryrefslogtreecommitdiffhomepage
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorGravatar rmistry <rmistry@google.com>2014-08-26 10:30:29 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-26 10:30:30 -0700
commitf2d83caf13afb09deae6355e2f59aa17b7c09058 (patch)
tree1468d4c2a3f8df3a1fc006d785ee9e00048f0dc7 /PRESUBMIT.py
parent680fb9e8f10d24b5fe35c90338de37c57392f1aa (diff)
Public API changes are allowed if an owner is TBR'ed.
The following TBR formats are supported: * TBR=reed * TBR=reed@google.com * TBR=xyz,reed * TBR=xyz,reed@google.com BUG=skia:2870 R=borenet@google.com Author: rmistry@google.com Review URL: https://codereview.chromium.org/504843003
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index ebba609210..726983027c 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -20,6 +20,7 @@ REVERT_CL_SUBJECT_PREFIX = 'Revert '
SKIA_TREE_STATUS_URL = 'http://skia-tree-status.appspot.com'
+# Please add the complete email address here (and not just 'xyz@' or 'xyz').
PUBLIC_API_OWNERS = (
'reed@chromium.org',
'reed@google.com',
@@ -206,6 +207,16 @@ def _CheckLGTMsForPublicAPI(input_api, output_api):
if re.match(REVERT_CL_SUBJECT_PREFIX, issue_properties['subject'], re.I):
# It is a revert CL, ignore the public api owners check.
return results
+
+ match = re.search(r'^TBR=(.*)$', issue_properties['description'], re.M)
+ if match:
+ tbr_entries = match.group(1).strip().split(',')
+ for owner in PUBLIC_API_OWNERS:
+ if owner in tbr_entries or owner.split('@')[0] in tbr_entries:
+ # If an owner is specified in the TBR= line then ignore the public
+ # api owners check.
+ return results
+
if issue_properties['owner_email'] in PUBLIC_API_OWNERS:
# An owner created the CL that is an automatic LGTM.
lgtm_from_owner = True