Fixing PHPCS errors.
This commit is contained in:
parent
ab4396e00d
commit
86b9c05f98
12 changed files with 13 additions and 26 deletions
|
|
@ -157,6 +157,8 @@ class WebhookController extends \PHPCI\Controller
|
|||
* Handle the payload when Github sends a commit webhook.
|
||||
* @param $project
|
||||
* @param array $payload
|
||||
* @param b8\Http\Response\JsonResponse $response
|
||||
* @return b8\Http\Response\JsonResponse
|
||||
*/
|
||||
protected function githubCommitRequest($project, array $payload, b8\Http\Response\JsonResponse $response)
|
||||
{
|
||||
|
|
@ -167,7 +169,6 @@ class WebhookController extends \PHPCI\Controller
|
|||
}
|
||||
|
||||
try {
|
||||
|
||||
if (isset($payload['commits']) && is_array($payload['commits'])) {
|
||||
// If we have a list of commits, then add them all as builds to be tested:
|
||||
|
||||
|
|
@ -265,13 +266,10 @@ class WebhookController extends \PHPCI\Controller
|
|||
$payload = json_decode($payloadString, true);
|
||||
|
||||
try {
|
||||
|
||||
|
||||
// build on merge request events
|
||||
if (isset($payload['object_kind']) && $payload['object_kind'] == 'merge_request') {
|
||||
$attributes = $payload['object_attributes'];
|
||||
if ($attributes['state'] == 'opened' || $attributes['state'] == 'reopened') {
|
||||
|
||||
$branch = $attributes['source_branch'];
|
||||
$commit = $attributes['last_commit'];
|
||||
$committer = $commit['author']['email'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue