diff --git a/arcanist/workflow/ArcanistLandBotWorkflow.php b/arcanist/workflow/ArcanistLandBotWorkflow.php --- a/arcanist/workflow/ArcanistLandBotWorkflow.php +++ b/arcanist/workflow/ArcanistLandBotWorkflow.php @@ -147,11 +147,24 @@ } unset($token); + // Get committer info. + // Note that Arcanist's getAuthor() is a misnomer, as it effectively + // returns the git configured user name. + $committerName = $repositoryApi->getAuthor(); + // Get the configured email similar to how getAuthor() is implemented. + // Arcanist provides no API for this. + list($gitAuthorIdent) = $repositoryApi->execxLocal('var GIT_AUTHOR_IDENT'); + preg_match('/<(.*)>/', rtrim($gitAuthorIdent, "\n"), + $gitAuthorEmailMatches); + $committerEmail = $gitAuthorEmailMatches[1]; + // Prepare cURL request to land bot $ch = curl_init('https://buildbot.bitcoinabc.org/land'); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type:application/json', 'Accept:application/json')); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array( + "committerName" => $committerName, + "committerEmail" => $committerEmail, "revision" => $revision, "conduitToken" => $encryptedToken))); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);