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.
This commit is contained in:
harsh mahajan committed 2026-08-11 18:26:33 +05:30
1 parent 7435126833
commit 646f8eeacf
1 file changed
+4 -2
+4 -2
View File
@@ -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'])) {