From 011792e26b6eb4f76419d3cbf59d9d9f6b17ce4d Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 26 Oct 2025 00:57:06 -0600 Subject: [PATCH] fix(api): update Bitbucket API URL construction to use a unified username variable --- apps/dokploy/pages/api/deploy/[refreshToken].ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dokploy/pages/api/deploy/[refreshToken].ts b/apps/dokploy/pages/api/deploy/[refreshToken].ts index 63d927568..fd01c81fa 100644 --- a/apps/dokploy/pages/api/deploy/[refreshToken].ts +++ b/apps/dokploy/pages/api/deploy/[refreshToken].ts @@ -368,14 +368,14 @@ export const extractCommitedPaths = async ( .map((change: any) => change.new?.target?.hash) .filter(Boolean); const commitedPaths: string[] = []; + const username = + bitbucket?.bitbucketWorkspaceName || bitbucket?.bitbucketUsername || ""; for (const commit of commitHashes) { - const url = `https://api.bitbucket.org/2.0/repositories/${bitbucket?.bitbucketUsername}/${repository}/diffstat/${commit}`; - + const url = `https://api.bitbucket.org/2.0/repositories/${username}/${repository}/diffstat/${commit}`; try { const response = await fetch(url, { headers: getBitbucketHeaders(bitbucket!), }); - const data = await response.json(); for (const value of data.values) { if (value?.new?.path) commitedPaths.push(value.new.path);