PHP Интерфейс Gush\Adapter\IssueTracker

Note that each IssueTracker instance can be only used once per issue tracker system.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

authenticate() публичный Метод

Authenticates the tracker.
public authenticate ( ) : boolean
Результат boolean

closeIssue() публичный Метод

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

createComment() публичный Метод

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

getComments() публичный Метод

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
Результат array[] [['id' => 1, ...]]

getIssue() публичный Метод

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
Результат array

getIssueUrl() публичный Метод

Gets the web-URL of the issue id.
public getIssueUrl ( integer $id ) : string
$id integer
Результат string ex. "https://github.com/octocat/Hello-World/issues/1347"

getIssues() публичный Метод

Gets the issues as array.
public getIssues ( array $parameters = [], integer $limit = 30 ) : array[]
$parameters array
$limit integer
Результат array[] An array where each entry has the same structure as described in getIssue()

getLabels() публичный Метод

When the issue tracker does not support labels, this will return an empty array
public getLabels ( ) : string[]
Результат string[]

getMilestones() публичный Метод

Gets the supported milestones.
public getMilestones ( array $parameters = [] ) : string[]
$parameters array
Результат string[]

isAuthenticated() публичный Метод

Returns true if the tracker is authenticated, false otherwise.
public isAuthenticated ( ) : boolean
Результат boolean

openIssue() публичный Метод

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
Результат integer issue-id

updateIssue() публичный Метод

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