Fixed a bug where the azureDevOps.token was not truly optional

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2024-04-04 14:49:22 -05:00
parent 229ce8be63
commit c7c4053d53
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-azure-devops-backend': patch
---
Fixed a bug where the `azureDevOps.token` was not truly optional
+1 -1
View File
@@ -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
*/
@@ -59,7 +59,7 @@ export async function createRouter(
): Promise<express.Router> {
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",
);