Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index cf46862354d71cb7d00c5bb0098b568237f6be33..bdcf0ad087b49ecdaacdd6586c449b31e9b89274 100644 |
--- a/PRESUBMIT.py |
+++ b/PRESUBMIT.py |
@@ -13,6 +13,8 @@ import os |
import sys |
+REVERT_CL_SUBJECT_PREFIX = 'Revert of ' |
+ |
SKIA_TREE_STATUS_URL = 'http://skia-tree-status.appspot.com' |
PUBLIC_API_OWNERS = ( |
@@ -20,7 +22,6 @@ PUBLIC_API_OWNERS = ( |
'reed@google.com', |
'bsalomon@chromium.org', |
'bsalomon@google.com', |
- 'rmistry@google.com', # For emergency reverts only. |
) |
@@ -127,6 +128,9 @@ def _CheckLGTMsForPublicAPI(input_api, output_api): |
if issue and input_api.rietveld: |
issue_properties = input_api.rietveld.get_issue_properties( |
issue=int(issue), messages=True) |
+ if issue_properties['subject'].startswith(REVERT_CL_SUBJECT_PREFIX): |
+ # It is a revert CL, ignore the public api owners check. |
+ return results |
borenet
2014/01/31 16:21:58
Seems like there should be a more robust way of do
rmistry
2014/01/31 16:24:00
Which format? the format of the subject? there is
borenet
2014/01/31 16:27:36
Yeah. I think this is okay, but I wish there was
rmistry
2014/01/31 17:29:42
That makes sense, done.
|
if issue_properties['owner_email'] in PUBLIC_API_OWNERS: |
# An owner created the CL that is an automatic LGTM. |
lgtm_from_owner = True |
@@ -139,7 +143,7 @@ def _CheckLGTMsForPublicAPI(input_api, output_api): |
# Found an lgtm in a message from an owner. |
lgtm_from_owner = True |
break; |
- |
+ |
if not lgtm_from_owner: |
results.append( |
output_api.PresubmitError( |