From f6ee6493e2393980b72f4b4300901f5e0ed9de78 Mon Sep 17 00:00:00 2001 From: localhost8080 Date: Sun, 15 Dec 2013 20:21:12 +0000 Subject: [PATCH] adding support for the 'committer' parameter adding support for the committer parameter in the email configuration section of phpci.yaml enabled with committer: true in your phpci.yml --- PHPCI/Command/PollCommand.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PHPCI/Command/PollCommand.php b/PHPCI/Command/PollCommand.php index 3918e27d..8bbe83cf 100644 --- a/PHPCI/Command/PollCommand.php +++ b/PHPCI/Command/PollCommand.php @@ -75,6 +75,7 @@ class PollCommand extends Command $commits = $http->get('/repos/' . $project->getReference() . '/commits', array('access_token' => $token)); $last_commit = $commits['body'][0]['sha']; + $last_committer = $commits['body'][0]['commit']['committer']['email']; $this->logger->info("Last commit to github for " . $project->getTitle() . " is " . $last_commit); @@ -87,7 +88,9 @@ class PollCommand extends Command $build->setStatus(Build::STATUS_NEW); $build->setBranch($project->getType() === 'hg' ? 'default' : 'master'); $build->setCreated(new \DateTime()); - + if (!empty($last_committer)) { + $build->setCommitterEmail($last_committer); + } $buildStore->save($build); $project->setLastCommit($last_commit);