Merge branch 'jihuMR' of https://gitlab.zcorp.cc/easycorp/zentaopms into jihuMR

This commit is contained in:
Guan Xiying
2021-08-25 10:33:09 +08:00
4 changed files with 130 additions and 0 deletions
+16
View File
@@ -110,6 +110,22 @@ class mr extends control
$this->view->MR = $MR;
$this->view->rawMR = isset($rawMR) ? $rawMR : false;
$this->loadModel('gitlab');
$sourceProject = $this->gitlab->apiGetSingleProject($MR->gitlabID, $MR->sourceProject);
$targetProject = $this->gitlab->apiGetSingleProject($MR->gitlabID, $MR->targetProject);
$sourceBranch = $this->gitlab->apiGetSingleBranch($MR->gitlabID, $MR->sourceProject, $MR->sourceBranch);
$targetBranch = $this->gitlab->apiGetSingleBranch($MR->gitlabID, $MR->targetProject, $MR->targetBranch);
$this->view->sourceProjectName = $sourceProject->name_with_namespace;
$this->view->targetProjectName = $targetProject->name_with_namespace;
$this->view->sourceProjectURL = $sourceBranch ->web_url;
$this->view->targetProjectURL = $targetBranch ->web_url;
/* Those variables are used to render $lang->mr->commandDocument. */
$this->view->httpRepoURL = $sourceProject->http_url_to_repo;
$this->view->branchPath = $sourceProject->path_with_namespace . '-' . $rawMR->source_branch;
$this->display();
}