Fix description overwrite

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2023-08-23 17:05:36 +02:00
parent e3f1488ac0
commit 6f874cdb04
2 changed files with 6 additions and 1 deletions
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Fixed a bug with the `generate-catalog-info` command that could cause `metadata.description` values to be overwritten by `package.json` description values only because unrelated attributes were being changed.
@@ -253,7 +253,7 @@ function createOrMergeEntity(
// Provide default name/title/description values.
name: safeEntityName,
title: packageJson.name,
...(packageJson.description
...(packageJson.description && !existingEntity.metadata?.description
? { description: packageJson.description }
: undefined),
},