From 9d35ad39d9bbfecf8f16745663a0ab87fc3bff93 Mon Sep 17 00:00:00 2001 From: "Frank W. Tag" Date: Wed, 29 Apr 2026 16:29:02 +0200 Subject: [PATCH] fixes api change to the bitbucket rest api (CHANGE-2770) --- .gitignore | 3 +++ src/Integrations/Bitbucket/BitbucketIntegration.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index aa54f070..8bf43dcc 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ /phpunit.xml .phpunit.result.cache ###< phpunit/phpunit ### + +/.ddev/ +/config/packages/config.local.yaml diff --git a/src/Integrations/Bitbucket/BitbucketIntegration.php b/src/Integrations/Bitbucket/BitbucketIntegration.php index 2b19349d..5f94f86f 100644 --- a/src/Integrations/Bitbucket/BitbucketIntegration.php +++ b/src/Integrations/Bitbucket/BitbucketIntegration.php @@ -150,7 +150,7 @@ public function organizations(App $app): array { $organizations = $this->getCached($app, 'orgs', callback: function () use ($app) { $accessToken = $this->refreshToken($app); - return $this->makeCGetRequest($accessToken, '/workspaces'); + return $this->makeCGetRequest($accessToken, '/user/workspaces'); }); return $this->processOrganizations($organizations); @@ -159,8 +159,8 @@ public function organizations(App $app): array protected function processOrganizations(array $organizations): array { return array_map(function ($org) { - $org['logo'] = $org['links']['avatar']['href'] ?? null; - $org['identifier'] = $org['slug']; + $org['logo'] = $org['workspace']['links']['avatar']['href'] ?? null; + $org['identifier'] = $org['workspace']['slug']; return $org; }, $organizations); }