diff --git a/.changeset/tiny-bulldogs-grow.md b/.changeset/tiny-bulldogs-grow.md index b6b54d5b57..406a087ca3 100644 --- a/.changeset/tiny-bulldogs-grow.md +++ b/.changeset/tiny-bulldogs-grow.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-azure-devops': minor +'@backstage/plugin-azure-devops': patch --- -the project and repository details can be obtained using the `backstage.io/managed-by-location` annotation +set azure annotation `dev.azure.com/project-repo` in `AnnotateScmSlugEntityProcessor` to find the project and repo information for the repos that contains `dev.azure.com` in the url diff --git a/plugins/catalog-backend/src/modules/core/AnnotateScmSlugEntityProcessor.ts b/plugins/catalog-backend/src/modules/core/AnnotateScmSlugEntityProcessor.ts index 241a27433e..a95a7e874e 100644 --- a/plugins/catalog-backend/src/modules/core/AnnotateScmSlugEntityProcessor.ts +++ b/plugins/catalog-backend/src/modules/core/AnnotateScmSlugEntityProcessor.ts @@ -27,6 +27,7 @@ import { CatalogProcessor } from '@backstage/plugin-catalog-node'; const GITHUB_ACTIONS_ANNOTATION = 'github.com/project-slug'; const GITLAB_ACTIONS_ANNOTATION = 'gitlab.com/project-slug'; +const AZURE_ACTIONS_ANNOTATION = 'dev.azure.com/project-repo'; /** @public */ export class AnnotateScmSlugEntityProcessor implements CatalogProcessor { @@ -81,6 +82,9 @@ export class AnnotateScmSlugEntityProcessor implements CatalogProcessor { case 'gitlab': annotation = GITLAB_ACTIONS_ANNOTATION; break; + case 'azure': + annotation = AZURE_ACTIONS_ANNOTATION; + break; default: return entity; } diff --git a/yarn.lock b/yarn.lock index 6d413632d1..363d1b26cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4900,7 +4900,6 @@ __metadata: "@testing-library/user-event": ^14.0.0 "@types/node": ^16.11.26 "@types/react": ^16.13.1 || ^17.0.0 - git-url-parse: ^13.1.0 humanize-duration: ^3.27.0 luxon: ^3.0.0 msw: ^1.0.0