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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user