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); }