( accessToken: string, instanceUrl: string = DEFAULT_GITLAB_URL )
| 464 | } |
| 465 | |
| 466 | const data = (await response.json()) as GitLabProject[]; |
| 467 | |
| 468 | projects.push( |
| 469 | ...data.filter(isActiveGitLabProject).map(project => ({ |
| 470 | id: project.id, |
| 471 | name: project.name, |
| 472 | full_name: project.path_with_namespace, |
| 473 | private: project.visibility === 'private', |
| 474 | })) |
| 475 | ); |
| 476 | |
| 477 | const nextPage = Number.parseInt(response.headers.get('x-next-page') || '', 10); |
| 478 | if (Number.isInteger(nextPage) && nextPage > page) { |
| 479 | page = nextPage; |
| 480 | continue; |
| 481 | } |
| 482 | |
| 483 | if (data.length < perPage) break; |
| 484 | page++; |
| 485 | } |
| 486 |
no test coverage detected