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

Unified Diff: presubmit_canned_checks.py

Issue 1923623004: Add --dry_run to presubmit_support. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fix Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | presubmit_support.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 56d2714fd99204e7468a5a62779b33390b1d8130..e63b798a32780f3e6dc317f93ba72b4882be6b4d 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -859,9 +859,12 @@ def CheckOwners(input_api, output_api, source_file_filter=None):
return [output_api.PresubmitNotifyResult(
'--tbr was specified, skipping OWNERS check')]
if input_api.change.issue:
- if _GetRietveldIssueProps(input_api, None).get('cq_dry_run', False):
+ if (input_api.dry_run or
+ # TODO(tandrii): clean below once CQ && run_presubmit.py recipe specify
+ # dry_run property. http://crbug.com/605563.
+ _GetRietveldIssueProps(input_api, None).get('cq_dry_run', False)):
return [output_api.PresubmitNotifyResult(
- 'This is a CQ dry run, skipping OWNERS check')]
+ 'This is a dry run, skipping OWNERS check')]
else:
return [output_api.PresubmitError("OWNERS check failed: this change has "
"no Rietveld issue number, so we can't check it for approvals.")]
@@ -875,6 +878,7 @@ def CheckOwners(input_api, output_api, source_file_filter=None):
input_api.change.AffectedFiles(file_filter=source_file_filter)])
owners_db = input_api.owners_db
+ # TODO(tandrii): this will always return None, set() in case of Gerrit.
owner_email, reviewers = _RietveldOwnerAndReviewers(
input_api,
owners_db.email_regexp,
« no previous file with comments | « no previous file | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698