use getCompoundEntityRef

Signed-off-by: Chris Suich <csuich2@gmail.com>
This commit is contained in:
Chris Suich
2025-05-07 10:34:07 -04:00
parent d8fea3377b
commit 5c81e9e165
+2 -4
View File
@@ -17,8 +17,8 @@
import { Config } from '@backstage/config';
import {
CompoundEntityRef,
DEFAULT_NAMESPACE,
Entity,
getCompoundEntityRef,
parseEntityRef,
} from '@backstage/catalog-model';
import {
@@ -88,9 +88,7 @@ export const buildTechDocsURL = (
return undefined;
}
let namespace = entity.metadata.namespace || DEFAULT_NAMESPACE;
let kind = entity.kind;
let name = entity.metadata.name;
let { namespace, kind, name } = getCompoundEntityRef(entity);
if (entity.metadata.annotations?.[TECHDOCS_EXTERNAL_ANNOTATION]) {
try {