From e86fe982e811360b8e9dcb3688c543efd153fff4 Mon Sep 17 00:00:00 2001 From: Edward Lesmes Date: Mon, 30 Apr 2018 13:22:29 -0400 Subject: [PATCH] bot_update: Set user.{name,email} when applying patch refs. git rebase complains when user name/email has not been configured, as was the case for the Chromium trybot. Bug: 643346 Change-Id: Iab7dac0a98608e09b63a53d5bacb98925701fbfd Reviewed-on: https://chromium-review.googlesource.com/1031524 Reviewed-by: Aaron Gable Commit-Queue: Edward Lesmes --- recipes/recipe_modules/bot_update/resources/bot_update.py | 5 +++++ recipes/trigger_recipe_roller.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py index 3e5361875..6d56d8a6c 100755 --- a/recipes/recipe_modules/bot_update/resources/bot_update.py +++ b/recipes/recipe_modules/bot_update/resources/bot_update.py @@ -339,6 +339,11 @@ def gclient_sync( fd, gclient_output_file = tempfile.mkstemp(suffix='.json') os.close(fd) + # Some bots don't have git user name/email configured, which causes problems + # when rebasing. + git('config', 'user.name', 'chrome-bot') + git('config', 'user.email', 'chrome-bot@chromium.org') + args = ['sync', '--verbose', '--reset', '--force', '--ignore_locks', '--output-json', gclient_output_file, '--nohooks', '--noprehooks', '--delete_unversioned_trees'] diff --git a/recipes/trigger_recipe_roller.txt b/recipes/trigger_recipe_roller.txt index c190de528..a814237e3 100644 --- a/recipes/trigger_recipe_roller.txt +++ b/recipes/trigger_recipe_roller.txt @@ -1,4 +1,4 @@ -No-op file. Edit this to kick recipes. (Did they do something wrong?) +No-op file. Edit this to kick recipes. This is a beginning of a story in this silly file. Once upon a time, a budding web browser dev team needed a CI system.