catch empty commit id from github

This commit is contained in:
Jimmy Cleuren 2013-11-19 22:47:12 +01:00
parent 4bc7a6c767
commit 8f58902339

View file

@ -58,8 +58,7 @@ class PollCommand extends Command
$token = $this->settings['phpci']['github']['token'];
if(!$token)
{
if (!$token) {
$this->logger->error("No github token found");
exit();
}
@ -79,8 +78,7 @@ class PollCommand extends Command
$this->logger->info("Last commit to github for " . $project->getTitle() . " is " . $last_commit);
if($project->getLastCommit() != $last_commit)
{
if ($project->getLastCommit() != $last_commit && $last_commit != "") {
$this->logger->info("Last commit is different from database, adding new build for " . $project->getTitle());
$build = new Build();