Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(259)

Unified Diff: PRESUBMIT.py

Issue 151573002: Do not enforce the public API presubmit check for Revert CLs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change revert prefix Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index cf46862354d71cb7d00c5bb0098b568237f6be33..9d1e9badc73671cc5d333ad712e6a6638a173628 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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698