* Adjust task check repo logic.

This commit is contained in:
caoyanyi
2024-04-09 16:12:51 +08:00
parent 12a90e526e
commit 6c84ee47b7
3 changed files with 27 additions and 5 deletions
+1 -5
View File
@@ -35,11 +35,7 @@ if(!empty($actions)) $actions = array_merge($actions['mainActions'], array('type
if(!$hasDivider) unset($actions['type']);
foreach($actions as $key => $action)
{
if(isset($action['url']) && strpos($action['url'], 'createBranch') !== false)
{
$hasRepo = $this->loadModel('repo')->getRepoPairs('execution', $task->execution, false);
if(empty($hasRepo)) unset($actions[$key]);
}
if(isset($action['url']) && strpos($action['url'], 'createBranch') !== false && empty($hasGitRepo)) unset($actions[$key]);
if(isset($action['url']) && strpos($action['url'], 'view') !== false && $task->parent == 0) unset($actions[$key]);
if(isset($actions[$key]['url']))
{