circleci,cloudbuild,github-actions,jenkins: rename internal entity conditional

This commit is contained in:
Patrik Oldsberg
2021-02-07 23:48:31 +01:00
parent 3eb1b1bacc
commit 8e1789e0c3
8 changed files with 16 additions and 16 deletions
@@ -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} />
);
+2 -2
View File
@@ -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';