Devin Smith 41e8600690 more deployment changes
partial #3787
added support for deployment to any repo path.
added tagging system
2014-11-18 16:08:23 -08:00

32 lines
980 B
PHP
Executable File

<?php
namespace Github\Api\Repository;
use Github\Api\AbstractApi;
/**
* @link http://developer.github.com/v3/repos/commits/
* @author Joseph Bielawski <stloyd@gmail.com>
*/
class Commits extends AbstractApi
{
public function all($username, $repository, array $params)
{
return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits', $params);
}
public function compare($username, $repository, $base, $head, $mediaType = NULL)
{
$headers = array();
if (NULL !== $mediaType) {
$headers['Accept'] = $mediaType;
}
return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/compare/'.rawurlencode($base).'...'.rawurlencode($head), array(), $headers);
}
public function show($username, $repository, $sha)
{
return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits/'.rawurlencode($sha));
}
}