* @package repo * @version 1 * @link http://www.zentao.net */ class mrEntry extends baseEntry { /** * Create mr. * * @access public * @return string */ public function post() { $fields = 'repoID,jobID,sourceBranch,targetBranch,diffs,mergeStatus'; $this->batchSetPost($fields); $postData = fixer::input('post')->get(); $this->loadController('mr', 'create'); $MRID = $this->loadModel('mr')->apiCreate(); if(dao::isError()) $this->sendError(400, dao::getError()); $MR = $this->mr->getByID($MRID); return $this->send(201, $MR); } }