Merge pull request #19439 from backstage/repo-tools/fix-desc-dry-run

[repo-tools] Fix `--dry-run` issue when descriptions aren't sync'd
This commit is contained in:
Patrik Oldsberg
2023-08-21 16:22:32 +02:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Fixed a bug with the `generate-catalog-info` command that could cause the `--dry-run` flag to indicate changes to files when no changes would actually be made if the command were run without the flag.
@@ -149,9 +149,8 @@ function fixCatalogInfoYaml(options: FixOptions) {
const badName = yamlJson.metadata.name !== safeName;
const badType =
yamlJson.spec?.type !== `backstage-${packageJson.backstage.role}`;
const badDesc = yamlJson.metadata.description !== packageJson.description;
if (badOwner || badTitle || badName || badType || badDesc) {
if (badOwner || badTitle || badName || badType) {
const owner = badOwner
? getOwnerFromCodeowners(codeowners, yamlPath)
: yamlJson.spec?.owner;