Skip to content
This repository was archived by the owner on Nov 5, 2020. It is now read-only.

Commit 2343b0f

Browse files
authored
Merge pull request #14 from larsborn/patch-1
bugfix for empy commit lists
2 parents f7da27c + 68b183d commit 2343b0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Provider/GithubProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ private function createPushEvent($data)
8181
$event->repository = $this->createRepository($data['repository']);
8282
$event->commits = $this->createCommits($data['commits']);
8383

84-
if (!$event->commits) {
85-
$event->commits[] = $this->createCommit($data['head_commit']); // fix empty commits
84+
if (!$event->commits and $data['head_commit']) {
85+
$event->commits[] = $this->createCommit($data['head_commit']);
8686
}
8787

8888
$event->type = Util::getPushType($event->ref);

0 commit comments

Comments
 (0)