diff --git a/.changeset/techdocs-metal-trees-push.md b/.changeset/techdocs-metal-trees-push.md new file mode 100644 index 0000000000..f6a88c404e --- /dev/null +++ b/.changeset/techdocs-metal-trees-push.md @@ -0,0 +1,6 @@ +--- +'@backstage/techdocs-common': patch +--- + +- Improve deprecation warning messaging in logs. +- Replace temp folder path from git provider domain(`source`) to full git host name (`resource`). (See: https://github.com/IonicaBizau/git-url-parse#giturlparseurl) diff --git a/packages/techdocs-common/src/helpers.ts b/packages/techdocs-common/src/helpers.ts index ec58bb7b40..be35a0b521 100644 --- a/packages/techdocs-common/src/helpers.ts +++ b/packages/techdocs-common/src/helpers.ts @@ -107,7 +107,7 @@ export const getGitRepositoryTempFolder = async ( // fs.realpathSync fixes a problem with macOS returning a path that is a symlink fs.realpathSync(os.tmpdir()), 'backstage-repo', - parsedGitLocation.source, + parsedGitLocation.resource, parsedGitLocation.owner, parsedGitLocation.name, parsedGitLocation.ref, diff --git a/packages/techdocs-common/src/stages/prepare/commonGit.ts b/packages/techdocs-common/src/stages/prepare/commonGit.ts index 46b96675f3..c38f5ced9d 100644 --- a/packages/techdocs-common/src/stages/prepare/commonGit.ts +++ b/packages/techdocs-common/src/stages/prepare/commonGit.ts @@ -40,9 +40,9 @@ export class CommonGitPreparer implements PreparerBase { options?: { etag?: string }, ): Promise { this.logger.warn( - 'You are using the legacy git preparer in TechDocs which will be removed in near future (March 2021). ' + - 'Migrate to URL reader by updating `backstage.io/techdocs-ref` annotation in `catalog-info.yaml` ' + - 'to be prefixed with `url:`. Read the migration guide and benefits at https://github.com/backstage/backstage/issues/4409 ', + `You are using the legacy git preparer in TechDocs for \`${entity.metadata.name}\` which will be removed in near future (March 2021). ` + + `Migrate to URL reader by updating \`backstage.io/techdocs-ref\` annotation in \`catalog-info.yaml\` ` + + `to be prefixed with \`url:\`. Read the migration guide and benefits at https://github.com/backstage/backstage/issues/4409 `, ); const { target } = parseReferenceAnnotation(