From 646f8eeacf0316086d542209ae56ef5697c3b998 Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Tue, 11 Aug 2026 18:26:33 +0530 Subject: [PATCH] fix(vcs): address a created Bitbucket repository by its slug A repository created through the OAuth2 path reported Bitbucket's uuid as its id, while listing reports the routable "workspace/slug". Every later lookup parses the latter, so connecting a freshly created repository failed with RepositoryNotFound. --- src/Appwrite/Auth/OAuth2/Bitbucket.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Auth/OAuth2/Bitbucket.php b/src/Appwrite/Auth/OAuth2/Bitbucket.php index de8b21145c..83a5f0cba1 100644 --- a/src/Appwrite/Auth/OAuth2/Bitbucket.php +++ b/src/Appwrite/Auth/OAuth2/Bitbucket.php @@ -219,8 +219,10 @@ class Bitbucket extends OAuth2 $repository = \json_decode($repository, true) ?? []; // Normalize to the GitHub/Gitea/GitLab field shape ProviderRepository expects. - if (isset($repository['uuid'])) { - $repository['id'] = $repository['uuid']; + // The id is the "workspace/slug" every later lookup routes on, which is + // what listing reports too -- a uuid resolves to no repository. + if (isset($repository['full_name'])) { + $repository['id'] = $repository['full_name']; } if (isset($repository['is_private'])) {