function GitBitbucketDriver::getRepoData
Attempts to fetch the repository data via the BitBucket API and sets some parameters which are used in other methods
@phpstan-impure
1 call to GitBitbucketDriver::getRepoData()
- GitBitbucketDriver::getRootIdentifier in vendor/
composer/ composer/ src/ Composer/ Repository/ Vcs/ GitBitbucketDriver.php - @inheritDoc
File
-
vendor/
composer/ composer/ src/ Composer/ Repository/ Vcs/ GitBitbucketDriver.php, line 103
Class
- GitBitbucketDriver
- @author Per Bernhardt <plb@webfactory.de>
Namespace
Composer\Repository\VcsCode
protected function getRepoData() : bool {
$resource = sprintf('https://api.bitbucket.org/2.0/repositories/%s/%s?%s', $this->owner, $this->repository, http_build_query([
'fields' => '-project,-owner',
], '', '&'));
$repoData = $this->fetchWithOAuthCredentials($resource, true)
->decodeJson();
if ($this->fallbackDriver) {
return false;
}
$this->parseCloneUrls($repoData['links']['clone']);
$this->hasIssues = !empty($repoData['has_issues']);
$this->branchesUrl = $repoData['links']['branches']['href'];
$this->tagsUrl = $repoData['links']['tags']['href'];
$this->homeUrl = $repoData['links']['html']['href'];
$this->website = $repoData['website'];
$this->vcsType = $repoData['scm'];
$this->repoData = $repoData;
return true;
}