diff --git a/src/lib/source-handlers/gitlab/list-repos.ts b/src/lib/source-handlers/gitlab/list-repos.ts index 924dc0d5..5819d83d 100644 --- a/src/lib/source-handlers/gitlab/list-repos.ts +++ b/src/lib/source-handlers/gitlab/list-repos.ts @@ -29,7 +29,10 @@ export async function fetchGitlabReposForPage( hasNextPage = true; repoData.push( ...projects - .filter((project: any) => !project.archived) + .filter( + (project: any) => + !project.archived && project.shared_with_groups?.length == 0, + ) .map((project: any) => ({ fork: !!project.forked_from_project, name: project.path_with_namespace, diff --git a/test/lib/source-handlers/gitlab/list-repos.test.ts b/test/lib/source-handlers/gitlab/list-repos.test.ts index 1f404a7d..79b81f87 100644 --- a/test/lib/source-handlers/gitlab/list-repos.test.ts +++ b/test/lib/source-handlers/gitlab/list-repos.test.ts @@ -22,5 +22,8 @@ describe('listGitlabRepos', () => { branch: expect.any(String), fork: expect.any(Boolean), }); + for (let i = 0; i < repos.length; i ++){ + expect(repos[i].name).not.toContain("shared-with-group"); + } }); });