Changes the chosen annotation to
Signed-off-by: jrwpatterson <jrwpatterson@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user