diff --git a/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts b/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts index f92a5c6f7c..858219423f 100644 --- a/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts +++ b/plugins/catalog-backend/src/ingestion/processors/BitbucketDiscoveryProcessor.ts @@ -22,7 +22,7 @@ import { } from '@backstage/integration'; import { LocationSpec } from '@backstage/catalog-model'; import { - Repository, + Bitbucket, BitbucketRepositoryParser, BitbucketClient, defaultRepositoryParser, @@ -159,5 +159,5 @@ function escapeRegExp(str: string): RegExp { type Result = { scanned: number; - matches: Repository[]; + matches: Bitbucket.Repository[]; }; diff --git a/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.test.ts b/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.test.ts index ab5080f446..e0d430f77b 100644 --- a/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { defaultRepositoryParser } from './BitbucketRepositoryParser'; -import { Project, Repository } from './types'; +import { Bitbucket } from './types'; import { BitbucketClient } from './client'; import { results } from '../index'; @@ -36,12 +36,12 @@ describe('BitbucketRepositoryParser', () => { const actual = await defaultRepositoryParser({ client: {} as BitbucketClient, repository: { - project: {} as Project, + project: {} as Bitbucket.Project, slug: 'repo-slug', links: { self: [{ href: browseUrl }], }, - } as Repository, + } as Bitbucket.Repository, path: path, }); diff --git a/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.ts b/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.ts index f786b6dac8..05e3c6822a 100644 --- a/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.ts +++ b/plugins/catalog-backend/src/ingestion/processors/bitbucket/BitbucketRepositoryParser.ts @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Repository } from './types'; +import { Bitbucket } from './types'; import { CatalogProcessorResult } from '../types'; import { results } from '../index'; import { BitbucketClient } from './client'; export type BitbucketRepositoryParser = (options: { client: BitbucketClient; - repository: Repository; + repository: Bitbucket.Repository; path: string; }) => AsyncIterable; diff --git a/plugins/catalog-backend/src/ingestion/processors/bitbucket/types.ts b/plugins/catalog-backend/src/ingestion/processors/bitbucket/types.ts index 75dd372faa..8a8656f666 100644 --- a/plugins/catalog-backend/src/ingestion/processors/bitbucket/types.ts +++ b/plugins/catalog-backend/src/ingestion/processors/bitbucket/types.ts @@ -13,16 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export type Project = { - key: string; -}; +export namespace Bitbucket { + export type Project = { + key: string; + }; -export type Repository = { - project: Project; - slug: string; - links: Record; -}; + export type Repository = { + project: Project; + slug: string; + links: Record; + }; -export type Link = { - href: string; -}; + export type Link = { + href: string; + }; +} diff --git a/plugins/catalog-backend/src/ingestion/processors/index.ts b/plugins/catalog-backend/src/ingestion/processors/index.ts index 8d1a7967cd..c8f51bbccc 100644 --- a/plugins/catalog-backend/src/ingestion/processors/index.ts +++ b/plugins/catalog-backend/src/ingestion/processors/index.ts @@ -36,6 +36,5 @@ export { UrlReaderProcessor } from './UrlReaderProcessor'; export { parseEntityYaml } from './util/parse'; export { results }; -export * from './bitbucket/types'; export { BitbucketClient } from './bitbucket'; -export type { BitbucketRepositoryParser } from './bitbucket'; +export type { BitbucketRepositoryParser, Bitbucket } from './bitbucket';