Changes the chosen annotation to

Signed-off-by: jrwpatterson <jrwpatterson@gmail.com>
This commit is contained in:
jrwpatterson
2023-08-11 08:03:21 +10:00
parent 42e3cc29cc
commit b516f70b83
7 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -30,10 +30,10 @@ type EntityPageDocsProps = { entity: Entity };
export const EntityPageDocs = ({ entity }: EntityPageDocsProps) => {
let entityRef = getCompoundEntityRef(entity);
if (entity.metadata.annotations?.['backstage.io/techdocs-external-ref']) {
if (entity.metadata.annotations?.['backstage.io/techdocs-entity']) {
try {
entityRef = parseEntityRef(
entity.metadata.annotations?.['backstage.io/techdocs-external-ref'],
entity.metadata.annotations?.['backstage.io/techdocs-entity'],
);
} catch {
// not a fan of this but we don't care if the parseEntityRef fails
+1 -1
View File
@@ -26,7 +26,7 @@ import { useEntity } from '@backstage/plugin-catalog-react';
const TECHDOCS_ANNOTATION = 'backstage.io/techdocs-ref';
const TECHDOCS_EXTERNAL_ANNOTATION = 'backstage.io/techdocs-external-ref';
const TECHDOCS_EXTERNAL_ANNOTATION = 'backstage.io/techdocs-entity';
/**
* Helper that takes in entity and returns true/false if TechDocs is available for the entity