Exemple #1
0
 private function createCommit($project, $result)
 {
     $commit = new Commit($project, $result['sha']);
     $commit->setAuthor($result['author']);
     $commit->setMessage($result['message']);
     $commit->setDate(\DateTime::createFromFormat('Y-m-d H:i:s', $result['date']));
     if ($result['build_date']) {
         $commit->setBuildDate(\DateTime::createFromFormat('Y-m-d H:i:s', $result['build_date']));
     }
     $commit->setStatusCode($result['status']);
     $commit->setOutput($result['output']);
     return $commit;
 }