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

Side by Side Diff: PRESUBMIT.py

Issue 1068853002: Bypass owners check for dry run CLs (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Remove test code Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 """Top-level presubmit script for Skia. 6 """Top-level presubmit script for Skia.
7 7
8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
9 for more details about the presubmit API built into gcl. 9 for more details about the presubmit API built into gcl.
10 """ 10 """
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 lgtm_from_owner = False 277 lgtm_from_owner = False
278 issue = input_api.change.issue 278 issue = input_api.change.issue
279 if issue and input_api.rietveld: 279 if issue and input_api.rietveld:
280 issue_properties = input_api.rietveld.get_issue_properties( 280 issue_properties = input_api.rietveld.get_issue_properties(
281 issue=int(issue), messages=True) 281 issue=int(issue), messages=True)
282 if re.match(REVERT_CL_SUBJECT_PREFIX, issue_properties['subject'], re.I): 282 if re.match(REVERT_CL_SUBJECT_PREFIX, issue_properties['subject'], re.I):
283 # It is a revert CL, ignore the public api owners check. 283 # It is a revert CL, ignore the public api owners check.
284 return results 284 return results
285 285
286 if re.search(r'^COMMIT=false$', issue_properties['description'], re.M): 286 # TODO(rmistry): Stop checking for COMMIT=false once crbug/470609 is
287 # Ignore public api owners check for COMMIT=false CLs since they are not 287 # resolved.
288 if issue_properties['cq_dry_run'] or re.search(
289 r'^COMMIT=false$', issue_properties['description'], re.M):
290 # Ignore public api owners check for dry run CLs since they are not
288 # going to be committed. 291 # going to be committed.
289 return results 292 return results
290 293
291 match = re.search(r'^TBR=(.*)$', issue_properties['description'], re.M) 294 match = re.search(r'^TBR=(.*)$', issue_properties['description'], re.M)
292 if match: 295 if match:
293 tbr_entries = match.group(1).strip().split(',') 296 tbr_entries = match.group(1).strip().split(',')
294 for owner in PUBLIC_API_OWNERS: 297 for owner in PUBLIC_API_OWNERS:
295 if owner in tbr_entries or owner.split('@')[0] in tbr_entries: 298 if owner in tbr_entries or owner.split('@')[0] in tbr_entries:
296 # If an owner is specified in the TBR= line then ignore the public 299 # If an owner is specified in the TBR= line then ignore the public
297 # api owners check. 300 # api owners check.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 state and an error if it is in 'Closed' state. 465 state and an error if it is in 'Closed' state.
463 """ 466 """
464 results = [] 467 results = []
465 results.extend(_CommonChecks(input_api, output_api)) 468 results.extend(_CommonChecks(input_api, output_api))
466 results.extend( 469 results.extend(
467 _CheckTreeStatus(input_api, output_api, json_url=( 470 _CheckTreeStatus(input_api, output_api, json_url=(
468 SKIA_TREE_STATUS_URL + '/banner-status?format=json'))) 471 SKIA_TREE_STATUS_URL + '/banner-status?format=json')))
469 results.extend(_CheckLGTMsForPublicAPI(input_api, output_api)) 472 results.extend(_CheckLGTMsForPublicAPI(input_api, output_api))
470 results.extend(_CheckOwnerIsInAuthorsFile(input_api, output_api)) 473 results.extend(_CheckOwnerIsInAuthorsFile(input_api, output_api))
471 return results 474 return results
OLDNEW
« 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