* Modify edit mr.

This commit is contained in:
caoyanyi
2022-08-11 14:26:04 +08:00
parent 6e16aeaea5
commit 22a6755bfe
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -903,13 +903,13 @@ class mrModel extends model
}
else
{
$url = sprintf($this->loadModel('gitea')->getApiRoot($hostID), "/repos/$projectID/pulls/$MRID");
$url = sprintf($this->loadModel($host->type)->getApiRoot($hostID), "/repos/$projectID/pulls/$MRID");
$newMR->base = $MR->targetBranch;
$newMR->body = $MR->description;
if($MR->assignee)
{
$assignee = $this->gitea->getUserIDByZentaoAccount($this->post->hostID, $MR->assignee);
$assignee = $this->{$host->type}->getUserIDByZentaoAccount($this->post->hostID, $MR->assignee);
if($assignee) $newMR->assignee = $assignee;
}
+1 -1
View File
@@ -50,7 +50,7 @@
<th style="white-space: nowrap;"><?php echo $lang->mr->targetProject;?></th>
<td>
<div class='input-group'>
<?php if($MR->status == 'merged' or $MR->status == 'closed'):?>
<?php if($MR->status == 'merged' or $MR->status == 'closed' or $host->type == 'gogs'):?>
<span class='fix-border text-left'>
<?php echo $host->type == 'gitlab' ? $this->loadModel('gitlab')->apiGetSingleProject($MR->hostID, $MR->targetProject)->name_with_namespace : $MR->targetProject;?>:
<?php echo $MR->targetBranch;?>