(projectIds: string[])
| 38 | } |
| 39 | |
| 40 | export async function importProjects(projectIds: string[]) { |
| 41 | const candidates = await scanKnownProjects(projectIds) |
| 42 | let repoProjectCount = 0 |
| 43 | let originProjectCount = 0 |
| 44 | |
| 45 | for (const candidate of candidates) { |
| 46 | if (candidate.isGitRepo) { |
| 47 | repoProjectCount += 1 |
| 48 | } |
| 49 | |
| 50 | if (candidate.hasOrigin) { |
| 51 | originProjectCount += 1 |
| 52 | } |
| 53 | |
| 54 | setProjectRepoOrigin(candidate.projectId, candidate.originUrl) |
| 55 | } |
| 56 | |
| 57 | setProjectImportState(true) |
| 58 | |
| 59 | return { |
| 60 | importedProjectIds: candidates.map((candidate) => candidate.projectId), |
| 61 | checkedProjectCount: candidates.length, |
| 62 | repoProjectCount, |
| 63 | originProjectCount, |
| 64 | } |
| 65 | } |
nothing calls this directly
no test coverage detected