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
This commit is contained in:
localhost8080 2013-12-15 20:21:12 +00:00
parent 725e2aeadd
commit f6ee6493e2

View file

@ -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);