aboutsummaryrefslogtreecommitdiffhomepage
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-31 17:33:04 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-31 17:33:04 +0000
commitcfdc5962273b4e2318033c27561cf8faf4afa0df (patch)
tree025526f3849a7ce829fae9a83fa35efded9de6b7 /PRESUBMIT.py
parentbf6a6d45043393f8cd9c942d7f03b789fe2c94b3 (diff)
Do not enforce the public API presubmit check for Revert CLs.
NOTRY=true BUG=skia:2068 R=borenet@google.com Author: rmistry@google.com Review URL: https://codereview.chromium.org/151573002 git-svn-id: http://skia.googlecode.com/svn/trunk@13270 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index cf46862354..9d1e9badc7 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -10,9 +10,12 @@ for more details about the presubmit API built into gcl.
"""
import os
+import re
import sys
+REVERT_CL_SUBJECT_PREFIX = 'Revert '
+
SKIA_TREE_STATUS_URL = 'http://skia-tree-status.appspot.com'
PUBLIC_API_OWNERS = (
@@ -20,7 +23,6 @@ PUBLIC_API_OWNERS = (
'reed@google.com',
'bsalomon@chromium.org',
'bsalomon@google.com',
- 'rmistry@google.com', # For emergency reverts only.
)
@@ -127,6 +129,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 re.match(REVERT_CL_SUBJECT_PREFIX, issue_properties['subject'], re.I):
+ # It is a revert CL, 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
@@ -139,7 +144,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(