Explorar o código

Allow hook access for git repos on bitbucket, refs #296

Jordi Boggiano %!s(int64=12) %!d(string=hai) anos
pai
achega
2f46bede92
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Packagist/WebBundle/Controller/ApiController.php

+ 1 - 1
src/Packagist/WebBundle/Controller/ApiController.php

@@ -111,7 +111,7 @@ class ApiController extends Controller
             return new Response(json_encode(array('status' => 'error', 'message' => 'Missing or invalid payload',)), 406);
         }
 
-        $urlRegex = '{^(?:https?://)?(?P<host>bitbucket\.org)/(?P<path>[\w.-]+/[\w.-]+?)/?$}';
+        $urlRegex = '{^(?:https?://)?(?P<host>bitbucket\.org)/(?P<path>[\w.-]+/[\w.-]+?)(\.git)?/?$}';
         $repoUrl = $payload['canon_url'].$payload['repository']['absolute_url'];
 
         return $this->receivePost($request, $repoUrl, $urlRegex);