메소드 | 설명 | |
---|---|---|
authenticate ( ) : boolean | Authenticates the Adapter. | |
closePullRequest ( integer $id ) | Close a pull-request by id. | |
createComment ( integer $id, string $message ) : string | null | Creates a new a comment on an issue/pull-request. | |
createFork ( string $org ) : array | Creates a fork from upstream and returns an array with the forked url. | |
createRelease ( string $name, array $parameters = [] ) : array | Creates a new release. | |
createReleaseAssets ( integer $id, string $name, string $contentType, string $content ) : integer | Creates a new release asset. | |
createRepo ( string $name, string $description, string $homepage, boolean $public = true, null $organization = null, boolean $hasIssues = true, boolean $hasWiki = false, boolean $hasDownloads = false, integer $teamId, boolean $autoInit = true ) : array | ||
getComments ( integer $id ) : array[] | Gets comments of a pull-request. | |
getLabels ( ) : string[] | Gets the supported labels. | |
getMilestones ( array $parameters = [] ) : string[] | Gets the supported milestones. | |
getPullRequest ( integer $id ) : array | Gets the information of a pull-request by id. | |
getPullRequestCommits ( integer $id ) : array[] | Gets the version-commits of a pull-request. | |
getPullRequestStates ( ) : string[] | Gets the supported pull-request states. | |
getPullRequests ( string $state = null, integer $limit = 30 ) : array[] | Gets the pull-requests. | |
getReleaseAssets ( integer $id ) : array[] | Gets all available release assets of an release. | |
getReleases ( ) : array[] | Gets all available created-releases. | |
getRepositoryInfo ( string $org, string $repository ) : array | Gets the information from the requested repository. | |
isAuthenticated ( ) : boolean | Returns true if the adapter is authenticated, false otherwise. | |
openPullRequest ( string $base, string $head, string $subject, string $body, array $parameters = [] ) : array | Opens a new pull-request. | |
removeRelease ( integer $id ) | Deletes a release. | |
supportsRepository ( string $remoteUrl ) : boolean | Returns whether the repository is supported by this adapter. | |
switchPullRequestBase ( integer $prNumber, string $newBase, string $newHead, boolean $forceNewPr = false ) : array | Switches the pull-request base. | |
updatePullRequest ( integer $id, array $parameters ) | Updates the state of a pull-request by id. |
public closePullRequest ( integer $id ) | ||
$id | integer |
public createFork ( string $org ) : array | ||
$org | string | Organisation name |
리턴 | array | An array the with following keys: git_url, html_url |
public createReleaseAssets ( integer $id, string $name, string $contentType, string $content ) : integer | ||
$id | integer | Id of the release (must exist) |
$name | string | Name of the asset (including file extension) |
$contentType | string | Mime-type of the asset |
$content | string | Actual asset (in raw-binary form without conversion) |
리턴 | integer | returns the id of the asset |
public createRepo ( string $name, string $description, string $homepage, boolean $public = true, null $organization = null, boolean $hasIssues = true, boolean $hasWiki = false, boolean $hasDownloads = false, integer $teamId, boolean $autoInit = true ) : array | ||
$name | string | |
$description | string | |
$homepage | string | |
$public | boolean | |
$organization | null | |
$hasIssues | boolean | |
$hasWiki | boolean | |
$hasDownloads | boolean | |
$teamId | integer | |
$autoInit | boolean | |
리턴 | array |
public getComments ( integer $id ) : array[] | ||
$id | integer | |
리턴 | array[] | [['id' => 1, ...]] |
public getLabels ( ) : string[] | ||
리턴 | string[] |
public getMilestones ( array $parameters = [] ) : string[] | ||
$parameters | array | |
리턴 | string[] |
public getPullRequest ( integer $id ) : array | ||
$id | integer | |
리턴 | array |
public getPullRequestCommits ( integer $id ) : array[] | ||
$id | integer | |
리턴 | array[] | [['sha1' => 'dcb09b5b57875f334f61aebed695e2e4193db5e', ...]] |
public getPullRequestStates ( ) : string[] | ||
리턴 | string[] |
public getPullRequests ( string $state = null, integer $limit = 30 ) : array[] | ||
$state | string | Only get pull-requests with this state (use getPullRequestStates() for supported states) |
$limit | integer | |
리턴 | array[] | An array where each entry has the same structure as described in getPullRequest() |
public getReleaseAssets ( integer $id ) : array[] | ||
$id | integer | Id of the release (must exist) |
리턴 | array[] | [['id' => 1, ...]] |
public getReleases ( ) : array[] | ||
리턴 | array[] | [['id' => 1, ...]] |
public isAuthenticated ( ) : boolean | ||
리턴 | boolean |
public supportsRepository ( string $remoteUrl ) : boolean | ||
$remoteUrl | string | |
리턴 | boolean |
public switchPullRequestBase ( integer $prNumber, string $newBase, string $newHead, boolean $forceNewPr = false ) : array | ||
$prNumber | integer | |
$newBase | string | New base for the PR |
$newHead | string | org:branch |
$forceNewPr | boolean | Open new PR (even when switching is supported) |
리턴 | array | An array with the following keys: html_url, number (either the current or the new PR) |
public updatePullRequest ( integer $id, array $parameters ) | ||
$id | integer | |
$parameters | array |