Remove whitespace from empty lines, reformatted inline comments
This commit is contained in:
parent
66ffea12f0
commit
fe9289eda5
|
@ -85,30 +85,25 @@ class WebhookController extends \b8\Controller
|
||||||
public function bitbucket($projectId)
|
public function bitbucket($projectId)
|
||||||
{
|
{
|
||||||
$project = $this->fetchProject($projectId, 'bitbucket');
|
$project = $this->fetchProject($projectId, 'bitbucket');
|
||||||
|
|
||||||
/*
|
// Support both old services and new webhooks
|
||||||
* support both old services and new webhooks
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($payload = $this->getParam('payload')) {
|
if ($payload = $this->getParam('payload')) {
|
||||||
return $this->bitbucketService(json_decode($payload, true), $project);
|
return $this->bitbucketService(json_decode($payload, true), $project);
|
||||||
}
|
}
|
||||||
|
|
||||||
$payload = json_decode(file_get_contents("php://input"), true);
|
$payload = json_decode(file_get_contents("php://input"), true);
|
||||||
|
|
||||||
if (empty($payload['push']['changes'])) {
|
if (empty($payload['push']['changes'])) {
|
||||||
/*
|
// Invalid event from bitbucket
|
||||||
* invalid event from bitbucket
|
|
||||||
*/
|
|
||||||
return [
|
return [
|
||||||
'status' => 'failed',
|
'status' => 'failed',
|
||||||
'commits' => []
|
'commits' => []
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->bitbucketWebhook($payload, $project);
|
return $this->bitbucketWebhook($payload, $project);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bitbucket webhooks.
|
* Bitbucket webhooks.
|
||||||
*/
|
*/
|
||||||
|
@ -137,7 +132,7 @@ class WebhookController extends \b8\Controller
|
||||||
|
|
||||||
return array('status' => $status, 'commits' => $results);
|
return array('status' => $status, 'commits' => $results);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bitbucket POST service.
|
* Bitbucket POST service.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue