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 <maruel@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
changes/21/1176321/4
Robert Sesek 7 years ago committed by Commit Bot
parent 5e5c2173ba
commit 16a396e431

@ -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 = []

@ -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):

Loading…
Cancel
Save