techdocs: Add changeset for @backstage/integration changes

This commit is contained in:
Himanshu Mishra
2020-12-21 23:15:21 +01:00
parent c91e4d6b04
commit 8804e89811
2 changed files with 21 additions and 1 deletions
+20
View File
@@ -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.
```
<!-- Before -->
const directoryPreparer = new DirectoryPreparer(logger);
const commonGitPreparer = new CommonGitPreparer(logger);
<!-- Now -->
const directoryPreparer = new DirectoryPreparer(config, logger);
const commonGitPreparer = new CommonGitPreparer(config, logger);
```
+1 -1
View File
@@ -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;