Merge branch 'master' of https://github.com/crunchbutton/crunchbutton
This commit is contained in:
commit
5a07f4df10
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
class Cockpit_Github extends Cana_Model {
|
||||
public static function commits($user, $repo) {
|
||||
return c::github()->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 = '') {
|
||||
|
||||
@ -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]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user