circleci,cloudbuild,github-actions,jenkins: rename internal entity conditional
This commit is contained in:
@@ -23,7 +23,7 @@ import { WorkflowRunsTable } from './WorkflowRunsTable';
|
||||
import { GITHUB_ACTIONS_ANNOTATION } from './useProjectName';
|
||||
import { MissingAnnotationEmptyState } from '@backstage/core';
|
||||
|
||||
export const isPluginApplicableToEntity = (entity: Entity) =>
|
||||
export const isGithubActionsAvailable = (entity: Entity) =>
|
||||
Boolean(entity.metadata.annotations?.[GITHUB_ACTIONS_ANNOTATION]);
|
||||
|
||||
type Props = {
|
||||
@@ -34,7 +34,7 @@ type Props = {
|
||||
export const Router = (_props: Props) => {
|
||||
const { entity } = useEntity();
|
||||
|
||||
if (!isPluginApplicableToEntity(entity)) {
|
||||
if (!isGithubActionsAvailable(entity)) {
|
||||
return (
|
||||
<MissingAnnotationEmptyState annotation={GITHUB_ACTIONS_ANNOTATION} />
|
||||
);
|
||||
|
||||
@@ -25,8 +25,8 @@ export {
|
||||
export * from './api';
|
||||
export {
|
||||
Router,
|
||||
isPluginApplicableToEntity,
|
||||
isPluginApplicableToEntity as isGithubActionsAvailable,
|
||||
isGithubActionsAvailable,
|
||||
isGithubActionsAvailable as isPluginApplicableToEntity,
|
||||
} from './components/Router';
|
||||
export * from './components/Cards';
|
||||
export { GITHUB_ACTIONS_ANNOTATION } from './components/useProjectName';
|
||||
|
||||
Reference in New Issue
Block a user