diff --git a/.changeset/soft-files-smash.md b/.changeset/soft-files-smash.md new file mode 100644 index 0000000000..b87c555da0 --- /dev/null +++ b/.changeset/soft-files-smash.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-azure-devops-backend': patch +--- + +Fixed a bug where the `azureDevOps.token` was not truly optional diff --git a/plugins/azure-devops-backend/config.d.ts b/plugins/azure-devops-backend/config.d.ts index 7b85aad6be..b79cd1d058 100644 --- a/plugins/azure-devops-backend/config.d.ts +++ b/plugins/azure-devops-backend/config.d.ts @@ -28,7 +28,7 @@ export interface Config { * @visibility secret * @deprecated Use `integrations.azure` instead, see {@link https://backstage.io/docs/integrations/azure/locations} */ - token: string; + token?: string; /** * The organization of the given Azure instance */ diff --git a/plugins/azure-devops-backend/src/service/router.ts b/plugins/azure-devops-backend/src/service/router.ts index d81f4ff686..0697481e36 100644 --- a/plugins/azure-devops-backend/src/service/router.ts +++ b/plugins/azure-devops-backend/src/service/router.ts @@ -59,7 +59,7 @@ export async function createRouter( ): Promise { const { logger, reader, config, permissions } = options; - if (config.getString('azureDevOps.token')) { + if (config.getOptionalString('azureDevOps.token')) { logger.warn( "The 'azureDevOps.token' has been deprecated, use 'integrations.azure' instead, for more details see: https://backstage.io/docs/integrations/azure/locations", );