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

Side by Side Diff: PRESUBMIT.py

Issue 2299203002: Enable Gerrit support in Skia's PostUploadHook (Closed)
Patch Set: Initial upload Created 4 years, 3 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 * Adds 'NOTREECHECKS=true' for non master branch changes since they do not 436 * Adds 'NOTREECHECKS=true' for non master branch changes since they do not
437 need to be gated on the master branch's tree. 437 need to be gated on the master branch's tree.
438 * Adds 'NOTRY=true' for non master branch changes since trybots do not yet 438 * Adds 'NOTRY=true' for non master branch changes since trybots do not yet
439 work on them. 439 work on them.
440 * Adds 'NOPRESUBMIT=true' for non master branch changes since those don't 440 * Adds 'NOPRESUBMIT=true' for non master branch changes since those don't
441 run the presubmit checks. 441 run the presubmit checks.
442 * Adds extra trybots for the paths defined in PATH_TO_EXTRA_TRYBOTS. 442 * Adds extra trybots for the paths defined in PATH_TO_EXTRA_TRYBOTS.
443 """ 443 """
444 444
445 results = [] 445 results = []
446 if cl.IsGerrit():
447 results.append(
448 output_api.PresubmitNotifyResult(
449 'Post upload hooks are not yet supported for Gerrit CLs'))
450 return results
451
452 atleast_one_docs_change = False 446 atleast_one_docs_change = False
453 all_docs_changes = True 447 all_docs_changes = True
454 for affected_file in change.AffectedFiles(): 448 for affected_file in change.AffectedFiles():
455 affected_file_path = affected_file.LocalPath() 449 affected_file_path = affected_file.LocalPath()
456 file_path, _ = os.path.splitext(affected_file_path) 450 file_path, _ = os.path.splitext(affected_file_path)
457 if 'site' == file_path.split(os.path.sep)[0]: 451 if 'site' == file_path.split(os.path.sep)[0]:
458 atleast_one_docs_change = True 452 atleast_one_docs_change = True
459 else: 453 else:
460 all_docs_changes = False 454 all_docs_changes = False
461 if atleast_one_docs_change and not all_docs_changes: 455 if atleast_one_docs_change and not all_docs_changes:
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 state and an error if it is in 'Closed' state. 595 state and an error if it is in 'Closed' state.
602 """ 596 """
603 results = [] 597 results = []
604 results.extend(_CommonChecks(input_api, output_api)) 598 results.extend(_CommonChecks(input_api, output_api))
605 results.extend( 599 results.extend(
606 _CheckTreeStatus(input_api, output_api, json_url=( 600 _CheckTreeStatus(input_api, output_api, json_url=(
607 SKIA_TREE_STATUS_URL + '/banner-status?format=json'))) 601 SKIA_TREE_STATUS_URL + '/banner-status?format=json')))
608 results.extend(_CheckLGTMsForPublicAPI(input_api, output_api)) 602 results.extend(_CheckLGTMsForPublicAPI(input_api, output_api))
609 results.extend(_CheckOwnerIsInAuthorsFile(input_api, output_api)) 603 results.extend(_CheckOwnerIsInAuthorsFile(input_api, output_api))
610 return results 604 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