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, |