From 16a396e431ab37b95f4f651b62494b4d4e94f557 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 15 Aug 2018 21:11:29 +0000 Subject: [PATCH] Clarify OWNERS error if using TBR. The message was previously not clear that if the entire CL has any change to an OWNERS file, TBR will not apply. Change-Id: Ib30a93f80196f45b02a29701faab7cf581e37f50 Reviewed-on: https://chromium-review.googlesource.com/1176321 Reviewed-by: Marc-Antoine Ruel Commit-Queue: Robert Sesek --- presubmit_canned_checks.py | 4 ++-- tests/presubmit_unittest.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index dece7af52..c29cb09d1 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -892,8 +892,8 @@ def CheckOwners(input_api, output_api, source_file_filter=None): output_fn('Missing %s for these files:\n %s' % (needed, '\n '.join(sorted(missing_files))))] if input_api.tbr and affects_owners: - output_list.append(output_fn('Note that TBR does not apply to changes ' - 'that affect OWNERS files.')) + output_list.append(output_fn('The CL affects an OWNERS file, so TBR will ' + 'be ignored.')) if not input_api.is_committing: suggested_owners = owners_db.reviewers_for(missing_files, owner_email) owners_with_comments = [] diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py index ab0486205..94289b638 100755 --- a/tests/presubmit_unittest.py +++ b/tests/presubmit_unittest.py @@ -2763,7 +2763,7 @@ class CannedChecksUnittest(PresubmitTestsBase): expected_output=re.compile( 'Missing LGTM from an OWNER for these files:\n' ' foo\n' - '.*TBR does not apply to changes that affect OWNERS files.', + '.*The CL affects an OWNERS file, so TBR will be ignored.', re.MULTILINE)) def testCannedCheckOwners_WithoutOwnerLGTM(self):