diff --git a/include/library/Cockpit/Github.php b/include/library/Cockpit/Github.php index 2c2eab743..2f0a59263 100644 --- a/include/library/Cockpit/Github.php +++ b/include/library/Cockpit/Github.php @@ -1,8 +1,8 @@ api('repo')->commits()->all($user, $repo, ['sha' => 'master']); + public static function commits($user, $repo, $branch = 'master') { + return c::github()->api('repo')->commits()->all($user, $repo, ['sha' => $branch]); } public static function createTag($user, $repo, $tag, $sha = '', $body = '') { diff --git a/include/library/Crunchbutton/Deploy/Server.php b/include/library/Crunchbutton/Deploy/Server.php index 7bc6b2545..0ed6be77f 100644 --- a/include/library/Crunchbutton/Deploy/Server.php +++ b/include/library/Crunchbutton/Deploy/Server.php @@ -53,7 +53,7 @@ class Crunchbutton_Deploy_Server extends Cana_Table { if (!isset($this->_commits)) { $this->_commits = []; $repo = explode('/', $this->repo); - $logs = Github::commits($repo[0], $repo[1]); + $logs = Github::commits($repo[0], $repo[1], $repo[2]); if ($logs) { $travis = new Travis; $status = $travis->status($repo[0],$repo[1]);