+ Add tips for gitea and gogs mr.

This commit is contained in:
caoyanyi
2024-05-23 14:22:14 +08:00
parent 2050b65f41
commit 84b74a00a0
6 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -331,8 +331,8 @@ class mr extends control
$this->view->title = $this->lang->mr->view;
$this->view->MR = $MR;
$this->view->repoID = $MR->repoID;
$this->view->rawMR = isset($rawMR) ? $rawMR : false;
$this->view->repo = $this->loadModel('repo')->getByID($MR->repoID);
$this->view->reviewer = $this->loadModel('user')->getById($MR->assignee);
$this->view->actions = $this->loadModel('action')->getList('mr', $MRID);
$this->view->compile = $compile;
+1
View File
@@ -77,6 +77,7 @@ $lang->mr->acceptTip = 'Please approve this MR before merge';
$lang->mr->conflictsTip = 'This merge request has conflicts, cannot be merged';
$lang->mr->noChangesTip = 'Source branch and target branch have no changes, cannot be merged';
$lang->mr->compileTip = 'This merge request pipeline build is not successful, cannot be merged';
$lang->mr->notifyTip = 'This merge request has conflicts or no changes, cannot be merged';
$lang->mr->branchUpdateTip = 'Branch has been updated, execute pipeline';
$lang->mr->repeatedOperation = 'Do not repeat operations';
+1
View File
@@ -81,6 +81,7 @@ $lang->mr->acceptTip = 'Please approve this MR before merge';
$lang->mr->conflictsTip = 'This merge request has conflicts, cannot be merged';
$lang->mr->noChangesTip = 'Source branch and target branch have no changes, cannot be merged';
$lang->mr->compileTip = 'This merge request pipeline build is not successful, cannot be merged';
$lang->mr->notifyTip = 'This merge request has conflicts or no changes, cannot be merged';
$lang->mr->branchUpdateTip = 'Branch has been updated, execute pipeline';
$lang->mr->repeatedOperation = 'Do not repeat operations';
+1
View File
@@ -77,6 +77,7 @@ $lang->mr->acceptTip = 'Please approve this MR before merge';
$lang->mr->conflictsTip = 'This merge request has conflicts, cannot be merged';
$lang->mr->noChangesTip = 'Source branch and target branch have no changes, cannot be merged';
$lang->mr->compileTip = 'This merge request pipeline build is not successful, cannot be merged';
$lang->mr->notifyTip = 'This merge request has conflicts or no changes, cannot be merged';
$lang->mr->branchUpdateTip = 'Branch has been updated, execute pipeline';
$lang->mr->repeatedOperation = 'Do not repeat operations';
+1
View File
@@ -81,6 +81,7 @@ $lang->mr->acceptTip = '评审通过后才能合并';
$lang->mr->conflictsTip = '该合并请求存在冲突,无法评审通过';
$lang->mr->noChangesTip = '源分支与目标分支没有变化,无法评审通过';
$lang->mr->compileTip = '该合并请求流水线构建未成功,无法评审通过';
$lang->mr->notifyTip = '存在冲突或分支间没有变化,无法评审通过';
$lang->mr->branchUpdateTip = '分支有更新,可执行流水线';
$lang->mr->repeatedOperation = '请勿重复操作';
+2
View File
@@ -53,6 +53,8 @@ foreach($config->mr->view->operateList as $operate)
if($compileNotSuccess) $action['hint'] = $lang->mr->compileTip;
if($hasNoChange) $action['hint'] = $lang->mr->noChangesTip;
if($hasConflict) $action['hint'] = $lang->mr->conflictsTip;
if(in_array(strtolower($repo->SCM), array('gogs', 'gitea'))) $action['hint'] = $lang->mr->notifyTip;
}
}
}