* @package pipeline * @version 1 * @link http://www.zentao.net */ class pipelinesEntry extends entry { /** * GET method. * * @access public * @return string */ public function get() { $pipeline = $this->param('pipeline', ''); $repoUrl = $this->param('repoUrl', ''); if(empty($pipeline) and empty($repoUrl)) return $this->sendError(400, 'The parameter is incorrect!'); $repo = $this->loadModel('repo')->getRepoByUrl($repoUrl, $pipeline); if(empty($repo['data'])) return $this->sendError(400, $repo['message']); return $this->send(200, array('status' => 'success', 'repo' => $repo['data'])); } }