Update to only build the latest commit from a Github pull request webhook.
This commit is contained in:
parent
a188afb0da
commit
5f2de9a679
|
@ -232,6 +232,11 @@ class WebhookController extends \PHPCI\Controller
|
|||
}
|
||||
|
||||
foreach ($response['body'] as $commit) {
|
||||
// Skip all but the current HEAD commit ID:
|
||||
if ($commit['sha'] != $payload['head']['sha']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$branch = str_replace('refs/heads/', '', $payload['pull_request']['base']['ref']);
|
||||
$committer = $commit['commit']['author']['email'];
|
||||
$message = $commit['commit']['message'];
|
||||
|
|
Loading…
Reference in a new issue