diff --git a/plugins/github-actions/src/components/Router.tsx b/plugins/github-actions/src/components/Router.tsx index d0745f67d4..83c18ed483 100644 --- a/plugins/github-actions/src/components/Router.tsx +++ b/plugins/github-actions/src/components/Router.tsx @@ -22,7 +22,7 @@ import { WorkflowRunsTable } from './WorkflowRunsTable'; import { GITHUB_ACTIONS_ANNOTATION } from './useProjectName'; import { WarningPanel } from '@backstage/core'; -const isPluginApplicableToEntity = (entity: Entity) => +export const isPluginApplicableToEntity = (entity: Entity) => Boolean(entity.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION]) && entity.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION] !== ''; diff --git a/plugins/github-actions/src/index.ts b/plugins/github-actions/src/index.ts index 17c1fa2dd7..24fe6fc90d 100644 --- a/plugins/github-actions/src/index.ts +++ b/plugins/github-actions/src/index.ts @@ -16,6 +16,6 @@ export { plugin } from './plugin'; export * from './api'; -export { Router } from './components/Router'; +export { Router, isPluginApplicableToEntity } from './components/Router'; export * from './components/Cards'; export { GITHUB_ACTIONS_ANNOTATION } from './components/useProjectName';