Merge branch 'jihuMR' of https://gitlab.zcorp.cc/easycorp/zentaopms into jihuMR
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user