Remove self TBR to avoid setting Code-Review+1.

No-Presubmit: True
Bug: chromium:1260482
Change-Id: I988b4056ff2425f8ec764ab816a7966368b5c65a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/238160
Reviewed-by: Christoffer Jansson <jansson@google.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35363}
This commit is contained in:
Mirko Bonadei 2021-11-17 11:02:46 +01:00 committed by WebRTC LUCI CQ
parent 2ae54b921b
commit 5a9be308e3
2 changed files with 6 additions and 16 deletions

View File

@ -524,12 +524,8 @@ def GenerateCommitMessage(
else:
commit_msg.append('No update to Clang.\n')
# TBR needs to be non-empty for Gerrit to process it.
git_author = _RunCommand(['git', 'config', 'user.email'],
working_dir=CHECKOUT_SRC_DIR)[0].splitlines()[0]
tbr_authors = git_author + ',' + tbr_authors
commit_msg.append('TBR=%s' % tbr_authors)
if tbr_authors:
commit_msg.append('TBR=%s' % tbr_authors)
commit_msg.append('BUG=None')
return '\n'.join(commit_msg)

View File

@ -280,16 +280,10 @@ class TestRollChromiumRevision(unittest.TestCase):
current_commit_pos = 'cafe'
new_commit_pos = 'f00d'
with mock.patch('roll_deps._RunCommand', self.fake):
# We don't really care, but it's needed to construct the message.
self.fake.AddExpectation(['git', 'config', 'user.email'],
_returns=('nobody@nowhere.no', None),
_ignores=['working_dir'])
commit_msg = GenerateCommitMessage(NO_CHROMIUM_REVISION_UPDATE,
current_commit_pos,
new_commit_pos, changed_deps,
added_paths, removed_paths)
commit_msg = GenerateCommitMessage(NO_CHROMIUM_REVISION_UPDATE,
current_commit_pos,
new_commit_pos, changed_deps,
added_paths, removed_paths)
return [l.strip() for l in commit_msg.split('\n')]