gitlab_monitor/schedule/syncPipLine.ts
zhaoyingbo 18a95387ee
All checks were successful
CI Monitor CI/CD / build-image (push) Successful in 33s
CI Monitor CI/CD / deploy (push) Successful in 37s
chore: 更新lint-staged和commitlint配置
2024-07-25 01:09:24 +00:00

20 lines
668 B
TypeScript

import managePipeline from "../controllers/managePipeLine"
import manageProject from "../controllers/manageProject"
import manageUser from "../controllers/manageUser"
const syncPipLine = async () => {
const fullProjList = await manageProject.getFullProjList()
const fullPipelineList = await Promise.all(
fullProjList.map((v) => managePipeline.getFullPipelineList(v))
)
const fullUserMap = await manageUser.getFullUserMap(fullPipelineList)
const fullProjectMap = await manageProject.getFullProjectMap(fullProjList)
await managePipeline.insertFullPipelineList(
fullPipelineList,
fullUserMap,
fullProjectMap
)
}
export default syncPipLine