|
@@ -73,7 +73,7 @@ class ApiController extends Controller
|
|
return new JsonResponse(array('status' => 'error', 'message' => 'Missing payload parameter'), 406);
|
|
return new JsonResponse(array('status' => 'error', 'message' => 'Missing payload parameter'), 406);
|
|
}
|
|
}
|
|
|
|
|
|
- if (isset($payload['repository']['url'])) { // github/gitlab/anything hook; added support for ssh protocol
|
|
|
|
|
|
+ if (isset($payload['repository']['url'])) { // github/gitlab/anything hook
|
|
$urlRegex = '{^(?:ssh://git@|https?://|git://|git@)?(?P<host>[a-z0-9.-]+)[:/](?P<path>[\w.-]+/[\w.-]+?)(?:\.git)?$}i';
|
|
$urlRegex = '{^(?:ssh://git@|https?://|git://|git@)?(?P<host>[a-z0-9.-]+)[:/](?P<path>[\w.-]+/[\w.-]+?)(?:\.git)?$}i';
|
|
$url = $payload['repository']['url'];
|
|
$url = $payload['repository']['url'];
|
|
} elseif (isset($payload['canon_url']) && isset($payload['repository']['absolute_url'])) { // bitbucket hook
|
|
} elseif (isset($payload['canon_url']) && isset($payload['repository']['absolute_url'])) { // bitbucket hook
|