public function create($sProjectName, Commit $oCommit) { // Create build $aBuild = ['project' => $sProjectName, 'build_state_id' => BuildState::QUEUED, 'commit_node' => $oCommit->getNode(), 'commit_author' => $oCommit->getAuthor(), 'commit_message' => $oCommit->getMessage(), 'nb_of_steps' => null, 'execute_log' => []]; // Insert $aBuild['id'] = $this->oMapper->insert($aBuild); // Return return $aBuild; }
public function getProjectName(Commit $oCommit) { return sprintf('%s:%s', $this->oRepository->getName(), $oCommit->getBranch()); }