From 2dbdccb6ce38ea0a27cc87a6629e11dc2dbc8743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Fri, 15 Nov 2024 10:34:30 +0100 Subject: [PATCH] Removed circular import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .changeset/selfish-dots-attend.md | 5 +++++ plugins/scaffolder-backend-module-gitlab/src/util.ts | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 .changeset/selfish-dots-attend.md diff --git a/.changeset/selfish-dots-attend.md b/.changeset/selfish-dots-attend.md new file mode 100644 index 0000000000..d11d3003f1 --- /dev/null +++ b/.changeset/selfish-dots-attend.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend-module-gitlab': patch +--- + +Removed circular import diff --git a/plugins/scaffolder-backend-module-gitlab/src/util.ts b/plugins/scaffolder-backend-module-gitlab/src/util.ts index d897604956..db1468b180 100644 --- a/plugins/scaffolder-backend-module-gitlab/src/util.ts +++ b/plugins/scaffolder-backend-module-gitlab/src/util.ts @@ -22,7 +22,6 @@ import { import { Gitlab, GroupSchema } from '@gitbeaker/rest'; import { z } from 'zod'; import commonGitlabConfig from './commonGitlabConfig'; -import * as util from './util'; export const parseRepoHost = (repoUrl: string): string => { let parsed; @@ -138,10 +137,7 @@ export async function getTopLevelParentGroup( try { const topParentGroup = await client.Groups.show(groupId); if (topParentGroup.parent_id) { - return util.getTopLevelParentGroup( - client, - topParentGroup.parent_id as number, - ); + return getTopLevelParentGroup(client, topParentGroup.parent_id as number); } return topParentGroup as GroupSchema; } catch (error: any) {