public function addCommits(array $event, PushEvent $pushEvent)
 {
     if (isset($event['payload']['commits'])) {
         foreach ($event['payload']['commits'] as $commit) {
             $c = new Commit();
             $c->setSha($commit['sha']);
             $c->setAuthorEmail($commit['author']['email']);
             $c->setAuthorName($commit['author']['name']);
             $c->setMessage($commit['message']);
             $pushEvent->addCommit($c);
         }
     }
 }
 private function getBranchReference(PushEvent $event)
 {
     return $event->getRepository()->getId() . ':' . $this->getBranchName($event);
 }