PHP Class Gush\ThirdParty\Github\GitHubAdapter

Author: Aaron Scherer ([email protected])
Author: Sebastiaan Stok ([email protected])
Inheritance: extends Gush\Adapter\BaseAdapter, implements Gush\Adapter\IssueTracker, implements Gush\Adapter\SupportsDynamicLabels
Show file Open project: gushphp/gush

Protected Properties

Property Type Description
$client Github\Client
$config array
$domain string | null
$globalConfig Gush\Config
$url string | null

Public Methods

Method Description
__construct ( array $config, Config $globalConfig )
authenticate ( )
closeIssue ( $id )
closePullRequest ( $id )
createComment ( $id, $message )
createFork ( $org )
createRelease ( $name, array $parameters = [] )
createReleaseAssets ( $id, $name, $contentType, $content )
createRepo ( $name, $description, $homepage, $public = true, $organization = null, $hasIssues = true, $hasWiki = false, $hasDownloads = false, $teamId, $autoInit = true )
getComments ( $id )
getCommitStatuses ( string $org, string $repo, string $hash ) : array[] Gets the status of a commit reference.
getIssue ( $id )
getIssueUrl ( $id )
getIssues ( array $parameters = [], $limit = 30 )
getLabels ( )
getMilestones ( array $parameters = [] )
getPullRequest ( $id )
getPullRequestCommits ( $id )
getPullRequestStates ( )
getPullRequestUrl ( $id )
getPullRequests ( $state = null, $limit = 30 )
getReleases ( )
getRepositoryInfo ( $org, $repository )
isAuthenticated ( )
openIssue ( $subject, $body, array $options = [] )
openPullRequest ( $base, $head, $subject, $body, array $parameters = [] )
removeRelease ( $id )
supportsRepository ( $remoteUrl )
updateIssue ( $id, array $parameters )
updatePullRequest ( $id, array $parameters )

Protected Methods

Method Description
adaptIssueStructure ( array $issue )
adaptPullRequestStructure ( array $pr )
buildGitHubClient ( ) : Github\Client

Method Details

__construct() public method

public __construct ( array $config, Config $globalConfig )
$config array
$globalConfig Gush\Config

adaptIssueStructure() protected method

protected adaptIssueStructure ( array $issue )
$issue array

adaptPullRequestStructure() protected method

protected adaptPullRequestStructure ( array $pr )
$pr array

authenticate() public method

public authenticate ( )

buildGitHubClient() protected method

protected buildGitHubClient ( ) : Github\Client
return Github\Client

closeIssue() public method

public closeIssue ( $id )

closePullRequest() public method

public closePullRequest ( $id )

createComment() public method

public createComment ( $id, $message )

createFork() public method

public createFork ( $org )

createRelease() public method

public createRelease ( $name, array $parameters = [] )
$parameters array

createReleaseAssets() public method

public createReleaseAssets ( $id, $name, $contentType, $content )

createRepo() public method

public createRepo ( $name, $description, $homepage, $public = true, $organization = null, $hasIssues = true, $hasWiki = false, $hasDownloads = false, $teamId, $autoInit = true )

getComments() public method

public getComments ( $id )

getCommitStatuses() public method

Gets the status of a commit reference.
public getCommitStatuses ( string $org, string $repo, string $hash ) : array[]
$org string
$repo string
$hash string
return array[]

getIssue() public method

public getIssue ( $id )

getIssueUrl() public method

public getIssueUrl ( $id )

getIssues() public method

public getIssues ( array $parameters = [], $limit = 30 )
$parameters array

getLabels() public method

public getLabels ( )

getMilestones() public method

public getMilestones ( array $parameters = [] )
$parameters array

getPullRequest() public method

public getPullRequest ( $id )

getPullRequestCommits() public method

public getPullRequestCommits ( $id )

getPullRequestStates() public method

getPullRequestUrl() public method

public getPullRequestUrl ( $id )

getPullRequests() public method

public getPullRequests ( $state = null, $limit = 30 )

getReleases() public method

public getReleases ( )

getRepositoryInfo() public method

public getRepositoryInfo ( $org, $repository )

isAuthenticated() public method

public isAuthenticated ( )

openIssue() public method

public openIssue ( $subject, $body, array $options = [] )
$options array

openPullRequest() public method

public openPullRequest ( $base, $head, $subject, $body, array $parameters = [] )
$parameters array

removeRelease() public method

public removeRelease ( $id )

supportsRepository() public method

public supportsRepository ( $remoteUrl )

updateIssue() public method

public updateIssue ( $id, array $parameters )
$parameters array

updatePullRequest() public method

public updatePullRequest ( $id, array $parameters )
$parameters array

Property Details

$client protected property

protected Client,Github $client
return Github\Client

$config protected property

protected array $config
return array

$domain protected property

protected string|null $domain
return string | null

$globalConfig protected property

protected Config,Gush $globalConfig
return Gush\Config

$url protected property

protected string|null $url
return string | null