1
0
Fork 0

Merge pull request #7632 from glaubinix/f/bitbucket-get-change-date-branch-with-slash

Fix: Bitbucket getChangeDate throws exception for branches containing a slash
pull/7637/head
Jordi Boggiano 2018-09-12 18:29:03 +02:00 committed by GitHub
commit 55fec6575f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -189,6 +189,13 @@ abstract class BitbucketDriver extends VcsDriver
return $this->fallbackDriver->getFileContent($file, $identifier); return $this->fallbackDriver->getFileContent($file, $identifier);
} }
if (strpos($identifier, '/') !== false) {
$branches = $this->getBranches();
if (isset($branches[$identifier])) {
$identifier = $branches[$identifier];
}
}
$resource = sprintf( $resource = sprintf(
'https://api.bitbucket.org/1.0/repositories/%s/%s/raw/%s/%s', 'https://api.bitbucket.org/1.0/repositories/%s/%s/raw/%s/%s',
$this->owner, $this->owner,