Skip to content

Commit

Permalink
fix: show more logging around dropping Gitlab projects
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Dec 20, 2022
1 parent 6890246 commit 7569d6f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/source-handlers/gitlab/list-repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export async function fetchGitlabReposForPage(
)) as gitBeakerTypes.Types.ProjectExtendedSchema[];
const hasNextPage = projects.length ? true : false;

debug(`Found ${projects.length} projects in ${groupName}`);

for (const project of projects) {
const {
archived,
Expand All @@ -38,11 +40,15 @@ export async function fetchGitlabReposForPage(
path_with_namespace,
id,
} = project;

if (
archived ||
!default_branch ||
(shared_with_groups && shared_with_groups.length > 0)
) {
debug(
`Skipping project as it is either archived, has no default branch, shared with groups`,
);
continue;
}

Expand Down

0 comments on commit 7569d6f

Please sign in to comment.