From 7bd10b41ba934746f4aeec3d7dbbf9cc4631149b Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 8 May 2018 21:37:20 -0700 Subject: [PATCH] Fix #1145 - set commit author and email --- scripts/common.psm1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/common.psm1 b/scripts/common.psm1 index e99d9a0881..7a1fb5011f 100644 --- a/scripts/common.psm1 +++ b/scripts/common.psm1 @@ -171,7 +171,16 @@ function CommitUpdatedVersions( $subject = "Updating external dependencies" - Invoke-Block { & git commit -m $subject } | Out-Null + $gitConfigArgs = @() + if ($env:GITHUB_USER) { + $gitConfigArgs += '-c',"user.name=$env:GITHUB_USER" + } + + if ($env:GITHUB_EMAIL) { + $gitConfigArgs += '-c',"user.email=$env:GITHUB_EMAIL" + } + + Invoke-Block { & git @gitConfigArgs commit -m $subject } | Out-Null $body = "$subject`n`n"