diff --git a/.changeset/little-plums-beg.md b/.changeset/little-plums-beg.md new file mode 100644 index 0000000000..351545fd6b --- /dev/null +++ b/.changeset/little-plums-beg.md @@ -0,0 +1,20 @@ +--- +'@backstage/techdocs-common': patch +'@backstage/plugin-techdocs-backend': patch +--- + +Using @backstage/integration package for GitHub/GitLab/Azure tokens and request options. + +Most probably you do not have to make any changes in the app because of this change. +However, if you are using the `DirectoryPreparer` or `CommonGitPreparer` exported by +`@backstage/techdocs-common` package, you now need to add pass in a `config` (from `@backstage/config`) +instance as argument. + +``` + + const directoryPreparer = new DirectoryPreparer(logger); + const commonGitPreparer = new CommonGitPreparer(logger); + + const directoryPreparer = new DirectoryPreparer(config, logger); + const commonGitPreparer = new CommonGitPreparer(config, logger); +``` diff --git a/packages/techdocs-common/src/git-auth.ts b/packages/techdocs-common/src/git-auth.ts index 41a33340af..b58afae490 100644 --- a/packages/techdocs-common/src/git-auth.ts +++ b/packages/techdocs-common/src/git-auth.ts @@ -101,7 +101,7 @@ export const getTokenForGitRepo = async ( case 'azure/api': return getAzureIntegrationConfig(config, host).token; default: - throw new Error('Failed to get reository type'); + throw new Error('Failed to get repository type'); } } catch (error) { throw error;