* Add gitlab unit test

This commit is contained in:
zenggang
2024-01-11 03:30:03 +00:00
parent 00d66338ba
commit a355db9b9a
4 changed files with 157 additions and 15 deletions
-15
View File
@@ -2071,21 +2071,6 @@ class gitlabModel extends model
return false;
}
/**
* 获取项目类型是gitlab的产品。
* Get products which scm is GitLab by projects.
*
* @param array $projectIDs
* @return array
*/
public function getProductsByProjects(array $projectIDs): array
{
return $this->dao->select('path,product')->from(TABLE_REPO)->where('deleted')->eq('0')
->andWhere('SCM')->eq('Gitlab')
->andWhere('path')->in($projectIDs)
->fetchPairs('path', 'product');
}
/**
* 获取项目保护分支。
* Get protect branches of one project.