From bf7d86b10f3e9cd6d1dc90bca73681fa54299342 Mon Sep 17 00:00:00 2001 From: Lokananda Prabhu Date: Thu, 13 Aug 2026 12:35:48 +0530 Subject: [PATCH] fix(tekton): hide CI/CD tab when tekton annotation is not present Co-Authored-By: Claude Opus 4.6 Signed-off-by: Lokananda Prabhu --- workspaces/tekton/.changeset/fix-tekton-tab-visibility.md | 5 +++++ .../packages/app/src/components/catalog/EntityPage.tsx | 4 ++-- workspaces/tekton/plugins/tekton/src/alpha.tsx | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 workspaces/tekton/.changeset/fix-tekton-tab-visibility.md diff --git a/workspaces/tekton/.changeset/fix-tekton-tab-visibility.md b/workspaces/tekton/.changeset/fix-tekton-tab-visibility.md new file mode 100644 index 00000000000..6bcd4a0456a --- /dev/null +++ b/workspaces/tekton/.changeset/fix-tekton-tab-visibility.md @@ -0,0 +1,5 @@ +--- +'@backstage-community/plugin-tekton': patch +--- + +Hide the CI/CD tab on entity pages when the tekton annotation is not present diff --git a/workspaces/tekton/packages/app/src/components/catalog/EntityPage.tsx b/workspaces/tekton/packages/app/src/components/catalog/EntityPage.tsx index a37a4942619..b0e6e0e9056 100644 --- a/workspaces/tekton/packages/app/src/components/catalog/EntityPage.tsx +++ b/workspaces/tekton/packages/app/src/components/catalog/EntityPage.tsx @@ -173,7 +173,7 @@ const serviceEntityPage = ( {overviewContent} - + {cicdContent} @@ -219,7 +219,7 @@ const websiteEntityPage = ( {overviewContent} - + {cicdContent} diff --git a/workspaces/tekton/plugins/tekton/src/alpha.tsx b/workspaces/tekton/plugins/tekton/src/alpha.tsx index dad8c41e0ed..9aacfb6d6b0 100644 --- a/workspaces/tekton/plugins/tekton/src/alpha.tsx +++ b/workspaces/tekton/plugins/tekton/src/alpha.tsx @@ -15,12 +15,14 @@ */ import { createFrontendPlugin } from '@backstage/frontend-plugin-api'; import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha'; +import { isTektonCIAvailable } from './utils/isTektonCIAvailable'; const tektonEntityContent = EntityContentBlueprint.make({ name: 'tektonEntityContent', params: { path: '/tekton', title: 'Tekton', + filter: isTektonCIAvailable, loader: () => import('./components/Router').then(m => ), }, });