From af39b20668ad0533faa18be6bdfc1ba2b7305eeb Mon Sep 17 00:00:00 2001 From: Michael Sukkarieh Date: Fri, 19 Sep 2025 09:48:58 -0700 Subject: [PATCH] fix(azure): Set username in azuredevops clone url (#524) * set placeholder username for azuredevops clone url * changelog --- CHANGELOG.md | 1 + packages/backend/src/repoManager.ts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ff22a8c..62328e26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed sourcebot not pulling github forked repos [#499](https://github.com/sourcebot-dev/sourcebot/pull/499) +- Fixed azure devop cloud pat issue [#524](https://github.com/sourcebot-dev/sourcebot/pull/524) ## [4.7.0] - 2025-09-17 diff --git a/packages/backend/src/repoManager.ts b/packages/backend/src/repoManager.ts index 0a58c2fe..cc277a18 100644 --- a/packages/backend/src/repoManager.ts +++ b/packages/backend/src/repoManager.ts @@ -218,6 +218,10 @@ export class RepoManager implements IRepoManager { if (config.token) { const token = await getTokenFromConfig(config.token, connection.orgId, db, logger); return { + // @note: If we don't provide a username, the password will be set as the username. This seems to work + // for ADO cloud but not for ADO server. To fix this, we set a placeholder username to ensure the password + // is set correctly + username: 'user', password: token, } }