diff --git a/plugins/git-release-manager/src/features/Features.test.tsx b/plugins/git-release-manager/src/features/Features.test.tsx
index cdef4f0d43..28bd9b6310 100644
--- a/plugins/git-release-manager/src/features/Features.test.tsx
+++ b/plugins/git-release-manager/src/features/Features.test.tsx
@@ -41,6 +41,10 @@ describe('Features', () => {
createRc: { omit: true },
promoteRc: { omit: true },
patch: { omit: true },
+ custom: {
+ // shouldn't trigger "missing key" warning in console
+ factory: () => [
Custom 1
, Custom 2
],
+ },
}}
/>,
);
diff --git a/plugins/git-release-manager/src/features/Features.tsx b/plugins/git-release-manager/src/features/Features.tsx
index b8386c41cc..0fa5ded36d 100644
--- a/plugins/git-release-manager/src/features/Features.tsx
+++ b/plugins/git-release-manager/src/features/Features.tsx
@@ -29,6 +29,7 @@ import { useProjectContext } from '../contexts/ProjectContext';
import { useVersioningStrategyMatchesRepoTags } from '../hooks/useVersioningStrategyMatchesRepoTags';
import { validateTagName } from '../helpers/tagParts/validateTagName';
+import { Box } from '@material-ui/core';
import { ErrorBoundary, Progress } from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
@@ -89,6 +90,19 @@ export function Features({
);
}
+ let CustomFeatures =
+ features?.custom?.factory({
+ latestRelease: gitBatchInfo.value.latestRelease,
+ project,
+ releaseBranch: gitBatchInfo.value.releaseBranch,
+ repository: gitBatchInfo.value.repository,
+ }) ?? null;
+ if (Array.isArray(CustomFeatures)) {
+ CustomFeatures = CustomFeatures.map((CustomFeature, index) => (
+ {CustomFeature}
+ ));
+ }
+
return (
@@ -143,13 +157,7 @@ export function Features({
/>
)}
- {features?.custom?.factory &&
- features.custom.factory({
- latestRelease: gitBatchInfo.value.latestRelease,
- project,
- releaseBranch: gitBatchInfo.value.releaseBranch,
- repository: gitBatchInfo.value.repository,
- })}
+ {CustomFeatures}
);