Removed circular import

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-11-15 10:34:30 +01:00
parent 4dcc99d234
commit 2dbdccb6ce
2 changed files with 6 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-gitlab': patch
---
Removed circular import
@@ -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) {