From 01dcf6b69940500861b817474ab349c9644ad1c2 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Tue, 30 Oct 2018 15:40:30 +0100 Subject: [PATCH] roll_deps: Add TBR so autoroller can land changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No-Try: True Bug: chromium:698489 Change-Id: I38627e08331f6d981f5ed3759b744eb8e182fa7d Reviewed-on: https://chromium-review.googlesource.com/c/1307613 Reviewed-by: Patrik Höglund Commit-Queue: Oleh Prypin --- tools_libyuv/autoroller/roll_deps.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools_libyuv/autoroller/roll_deps.py b/tools_libyuv/autoroller/roll_deps.py index ea8f69f18..8359d3096 100755 --- a/tools_libyuv/autoroller/roll_deps.py +++ b/tools_libyuv/autoroller/roll_deps.py @@ -298,9 +298,6 @@ def GenerateCommitMessage(current_cr_rev, new_cr_rev, current_commit_pos, commit_msg.append('Change log: %s' % (CHROMIUM_LOG_TEMPLATE % rev_interval)) commit_msg.append('Full diff: %s\n' % (CHROMIUM_COMMIT_TEMPLATE % rev_interval)) - # TBR field will be empty unless in some custom cases, where some engineers - # are added. - tbr_authors = '' if changed_deps_list: commit_msg.append('Changed dependencies:') @@ -322,7 +319,11 @@ def GenerateCommitMessage(current_cr_rev, new_cr_rev, current_commit_pos, else: commit_msg.append('No update to Clang.\n') - commit_msg.append('TBR=%s' % tbr_authors) + # TBR needs to be non-empty for Gerrit to process it. + git_author = _RunCommand(['git', 'config', 'user.email'], + working_dir=CHECKOUT_SRC_DIR)[0].strip() + commit_msg.append('TBR=%s' % git_author) + commit_msg.append('BUG=None') return '\n'.join(commit_msg)