1
0
Fork 0

Support git@bitbucket.org URLs for git-bitbucket driver

pull/9391/head
Jordi Boggiano 2020-10-30 17:15:25 +01:00
parent 1d7ed333c9
commit 985cef790f
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ abstract class BitbucketDriver extends VcsDriver
*/ */
public function initialize() public function initialize()
{ {
preg_match('#^https?://bitbucket\.org/([^/]+)/([^/]+?)(\.git|/?)$#i', $this->url, $match); preg_match('#^(?:https?://bitbucket\.org/|git@bitbucket\.org:)([^/]+)/([^/]+?)(\.git|/?)$#i', $this->url, $match);
$this->owner = $match[1]; $this->owner = $match[1];
$this->repository = $match[2]; $this->repository = $match[2];
$this->originUrl = 'bitbucket.org'; $this->originUrl = 'bitbucket.org';

View File

@ -53,7 +53,7 @@ class GitBitbucketDriver extends BitbucketDriver
*/ */
public static function supports(IOInterface $io, Config $config, $url, $deep = false) public static function supports(IOInterface $io, Config $config, $url, $deep = false)
{ {
if (!preg_match('#^https?://bitbucket\.org/([^/]+)/(.+?)\.git$#i', $url)) { if (!preg_match('#^(?:https?://bitbucket\.org/|git@bitbucket\.org:)([^/]+)/(.+?)\.git$#i', $url)) {
return false; return false;
} }