| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- /**
- * The mr entry point of ZenTaoPMS.
- *
- * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
- * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
- * @author liyuchun <liyuchun@easysoft.ltd>
- * @package repo
- * @version 1
- * @link https://www.zentao.net
- */
- class mrEntry extends baseEntry
- {
- /**
- * Create mr.
- *
- * @access public
- * @return string
- */
- public function post()
- {
- $this->loadController('mr', 'create');
- $fields = 'repoID,jobID,sourceBranch,targetBranch,diffs,mergeStatus';
- $this->batchSetPost($fields);
- $MRID = $this->loadModel('mr')->apiCreate();
- if(dao::isError()) $this->sendError(400, dao::getError());
- $MR = $this->mr->fetchByID($MRID);
- return $this->send(201, $MR);
- }
- }
|