PHP Interface Gush\Adapter\IssueTracker

Note that each IssueTracker instance can be only used once per issue tracker system.
Exibir arquivo Open project: gushphp/gush

Public Methods

Method Description
authenticate ( ) : boolean Authenticates the tracker.
closeIssue ( integer $id ) Closes an issue by id.
createComment ( integer $id, string $message ) : string | null Creates a new a comment on an issue.
getComments ( integer $id ) : array[] Gets comments of an issue.
getIssue ( integer $id ) : array Gets an issue by id.
getIssueUrl ( integer $id ) : string Gets the web-URL of the issue id.
getIssues ( array $parameters = [], integer $limit = 30 ) : array[] Gets the issues as array.
getLabels ( ) : string[] Gets the supported labels.
getMilestones ( array $parameters = [] ) : string[] Gets the supported milestones.
isAuthenticated ( ) : boolean Returns true if the tracker is authenticated, false otherwise.
openIssue ( string $subject, string $body, array $options = [] ) : integer Opens a new issue on the issue tracker.
updateIssue ( integer $id, array $parameters ) Updates the state of an issue by id.

Method Details

authenticate() public method

Authenticates the tracker.
public authenticate ( ) : boolean
return boolean

closeIssue() public method

Closes an issue by id.
public closeIssue ( integer $id )
$id integer

createComment() public method

Creates a new a comment on an issue.
public createComment ( integer $id, string $message ) : string | null
$id integer
$message string
return string | null URL to the comment ex. "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1

getComments() public method

Returned value must be an array with the following data per entry (values are by example). If a value is not supported null must be used instead. "id": 1 "url": "https://github.com/octocat/Hello-World/issues/1347#issuecomment-1" "body": "Me too" "user": "username" "created_at": "DateTime Object" "updated_at": "DateTime Object"
public getComments ( integer $id ) : array[]
$id integer
return array[] [['id' => 1, ...]]

getIssue() public method

Returned value must be an array with the following data (values are by example). If a value is not supported null must be used instead. "url": "https://github.com/octocat/Hello-World/issues/1347" "number": 1347 "state": "open" "title": "Found a bug" "body": "I'm having a problem with this." "user": "username" "labels": ["bug"] "assignee": "username" "milestone": "v1.0" "created_at": "DateTime Object" "updated_at": "DateTime Object" "closed_by": "username" "pull_request": false
public getIssue ( integer $id ) : array
$id integer
return array

getIssueUrl() public method

Gets the web-URL of the issue id.
public getIssueUrl ( integer $id ) : string
$id integer
return string ex. "https://github.com/octocat/Hello-World/issues/1347"

getIssues() public method

Gets the issues as array.
public getIssues ( array $parameters = [], integer $limit = 30 ) : array[]
$parameters array
$limit integer
return array[] An array where each entry has the same structure as described in getIssue()

getLabels() public method

When the issue tracker does not support labels, this will return an empty array
public getLabels ( ) : string[]
return string[]

getMilestones() public method

Gets the supported milestones.
public getMilestones ( array $parameters = [] ) : string[]
$parameters array
return string[]

isAuthenticated() public method

Returns true if the tracker is authenticated, false otherwise.
public isAuthenticated ( ) : boolean
return boolean

openIssue() public method

Opens a new issue on the issue tracker.
public openIssue ( string $subject, string $body, array $options = [] ) : integer
$subject string Subject of the issue
$body string Body/message of the issue
$options array Extra options for the issue
return integer issue-id

updateIssue() public method

Updates the state of an issue by id.
public updateIssue ( integer $id, array $parameters )
$id integer
$parameters array