From e8357aae54bad6e2a26fa6bb52c64b50e36b7e26 Mon Sep 17 00:00:00 2001 From: Kiss Miklos Date: Mon, 3 Oct 2022 15:10:14 +0200 Subject: [PATCH] add more details to changesets Signed-off-by: Kiss Miklos --- .changeset/curvy-pets-wash.md | 4 ++-- .changeset/fuzzy-dolls-shake.md | 20 +++++++++++++++++-- .changeset/moody-carrots-shout.md | 2 +- .../src/service/CatalogBuilder.ts | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.changeset/curvy-pets-wash.md b/.changeset/curvy-pets-wash.md index 7e43228fbc..a0e9571b18 100644 --- a/.changeset/curvy-pets-wash.md +++ b/.changeset/curvy-pets-wash.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-catalog-backend': patch +'@backstage/plugin-catalog-backend': minor --- -Moved the code search for the existing catalog-info.yaml files to the backend from the frontend. It means it will use the configured GitHub integration's credentials +Added a new method `addLocationAnalyzers` to the `CatalogBuilder`. With this you can add location analyzers to your catalog. These analyzers will be used by the /analyze-location endpoint to decide if the provided URL contains any catalog-info.yaml files already or not. diff --git a/.changeset/fuzzy-dolls-shake.md b/.changeset/fuzzy-dolls-shake.md index 92380b37ec..0148a703a4 100644 --- a/.changeset/fuzzy-dolls-shake.md +++ b/.changeset/fuzzy-dolls-shake.md @@ -1,5 +1,21 @@ --- -'@backstage/plugin-catalog-import': minor +'@backstage/plugin-catalog-import': patch --- -Moved the code search for the existing catalog-info.yaml files to the backend from the frontend. It means it will use the configured GitHub integration's credentials +**Breaking** +Moved the code search for the existing catalog-info.yaml files to the backend from the frontend. It means it will use the configured GitHub integration's credentials. + +Add the following to your `CatalogBuilder` to have the repo URL ingestion working again. + +```ts +// catalog.ts +import { GitHubLocationAnalyzer } from '@backstage/plugin-catalog-backend-module-github'; +... + builder.addLocationAnalyzers( + new GitHubLocationAnalyzer({ + discovery: env.discovery, + config: env.config, + }), + ); +... +``` diff --git a/.changeset/moody-carrots-shout.md b/.changeset/moody-carrots-shout.md index 1b1555a5dd..486590e0ba 100644 --- a/.changeset/moody-carrots-shout.md +++ b/.changeset/moody-carrots-shout.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-catalog-backend-module-github': minor +'@backstage/plugin-catalog-backend-module-github': patch --- Added `GitHubLocationAnalyzer`. This can be used to add to the `CatalogBuilder`. When added this will be used by `RepoLocationAnalyzer` to figure out if the given URL that you are trying to import from the /catalog-import page already contains catalog-info.yaml files. diff --git a/plugins/catalog-backend/src/service/CatalogBuilder.ts b/plugins/catalog-backend/src/service/CatalogBuilder.ts index 5a737791ae..deed865314 100644 --- a/plugins/catalog-backend/src/service/CatalogBuilder.ts +++ b/plugins/catalog-backend/src/service/CatalogBuilder.ts @@ -343,7 +343,7 @@ export class CatalogBuilder { /** * Adds Location Analyzers. These are responsible for figuring out * if the repository already contains a catalog-info.yaml file when - * you register a repostiroy in the /catalog-import page + * you register a repository in the /catalog-import page * * @param locationAnalyzers - One or more location analyzers */