class JGithubPackageIssues extends JGithubPackage

GitHub API Issues class for the Joomla Platform.

Methods

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

__get( string $name)

Magic method to lazily create API objects

object
create( string $user, string $repo, string $title, string $body = null, string $assignee = null, integer $milestone = null, array $labels = null)

Method to create an issue.

object
edit( string $user, string $repo, integer $issueId, string $state = null, string $title = null, string $body = null, string $assignee = null, integer $milestone = null, array $labels = null)

Method to update an issue.

object
get( string $user, string $repo, integer $issueId)

Method to get a single issue.

array
getList( string $filter = null, string $state = null, string $labels = null, string $sort = null, string $direction = null, JDate $since = null, integer $page, integer $limit)

Method to list an authenticated user's issues.

array
getListByRepository( string $user, string $repo, string $milestone = null, string $state = null, string $assignee = null, string $mentioned = null, string $labels = null, string $sort = null, string $direction = null, JDate $since = null, integer $page, integer $limit)

Method to list issues.

object
createComment( string $user, string $repo, integer $issueId, string $body)

Method to create a comment on an issue.

object
createLabel( string $user, string $repo, string $name, string $color)

Method to create a label on a repo.

void
deleteComment( string $user, string $repo, integer $commentId)

Method to delete a comment on an issue.

object
deleteLabel( string $user, string $repo, string $label)

Method to delete a label on a repo.

object
editComment( string $user, string $repo, integer $commentId, string $body)

Method to update a comment on an issue.

object
editLabel( string $user, string $repo, string $label, string $name, string $color)

Method to update a label on a repo.

object
getComment( string $user, string $repo, integer $commentId)

Method to get a specific comment on an issue.

array
getComments( string $user, string $repo, integer $issueId, integer $page, integer $limit)

Method to get the list of comments on an issue.

object
getLabel( string $user, string $repo, string $name)

Method to get a specific label on a repo.

array
getLabels( string $user, string $repo)

Method to get the list of labels on a repo.

Details

__construct( Registry $options = null, JGithubHttp $client = null)

Constructor.

Parameters

Registry $options GitHub options object.
JGithubHttp $client The HTTP client object.

JGithubPackage __get( string $name)

Magic method to lazily create API objects

Parameters

string $name Name of property to retrieve

Return Value

JGithubPackage GitHub API package object.

Exceptions

RuntimeException

object create( string $user, string $repo, string $title, string $body = null, string $assignee = null, integer $milestone = null, array $labels = null)

Method to create an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $title The title of the new issue.
string $body The body text for the new issue.
string $assignee The login for the GitHub user that this issue should be assigned to.
integer $milestone The milestone to associate this issue with.
array $labels The labels to associate with this issue.

Return Value

object

Exceptions

DomainException

object edit( string $user, string $repo, integer $issueId, string $state = null, string $title = null, string $body = null, string $assignee = null, integer $milestone = null, array $labels = null)

Method to update an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $issueId The issue number.
string $state The optional new state for the issue. [open, closed]
string $title The title of the new issue.
string $body The body text for the new issue.
string $assignee The login for the GitHub user that this issue should be assigned to.
integer $milestone The milestone to associate this issue with.
array $labels The labels to associate with this issue.

Return Value

object

Exceptions

DomainException

object get( string $user, string $repo, integer $issueId)

Method to get a single issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $issueId The issue number.

Return Value

object

Exceptions

DomainException

array getList( string $filter = null, string $state = null, string $labels = null, string $sort = null, string $direction = null, JDate $since = null, integer $page, integer $limit)

Method to list an authenticated user's issues.

Parameters

string $filter The filter type: assigned, created, mentioned, subscribed.
string $state The optional state to filter requests by. [open, closed]
string $labels The list of comma separated Label names. Example: bug,ui,@high.
string $sort The sort order: created, updated, comments, default: created.
string $direction The list direction: asc or desc, default: desc.
JDate $since The date/time since when issues should be returned.
integer $page The page number from which to get items.
integer $limit The number of items on a page.

Return Value

array

Exceptions

DomainException

array getListByRepository( string $user, string $repo, string $milestone = null, string $state = null, string $assignee = null, string $mentioned = null, string $labels = null, string $sort = null, string $direction = null, JDate $since = null, integer $page, integer $limit)

Method to list issues.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $milestone The milestone number, 'none', or *.
string $state The optional state to filter requests by. [open, closed]
string $assignee The assignee name, 'none', or *.
string $mentioned The GitHub user name.
string $labels The list of comma separated Label names. Example: bug,ui,@high.
string $sort The sort order: created, updated, comments, default: created.
string $direction The list direction: asc or desc, default: desc.
JDate $since The date/time since when issues should be returned.
integer $page The page number from which to get items.
integer $limit The number of items on a page.

Return Value

array

Exceptions

DomainException

object createComment( string $user, string $repo, integer $issueId, string $body)

Method to create a comment on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $issueId The issue number.
string $body The comment body text.

Return Value

object

object createLabel( string $user, string $repo, string $name, string $color)

Method to create a label on a repo.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $name The label name.
string $color The label color.

Return Value

object

void deleteComment( string $user, string $repo, integer $commentId)

Method to delete a comment on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $commentId The id of the comment to delete.

Return Value

void

object deleteLabel( string $user, string $repo, string $label)

Method to delete a label on a repo.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $label The label name.

Return Value

object

object editComment( string $user, string $repo, integer $commentId, string $body)

Method to update a comment on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $commentId The id of the comment to update.
string $body The new body text for the comment.

Return Value

object

object editLabel( string $user, string $repo, string $label, string $name, string $color)

Method to update a label on a repo.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $label The label name.
string $name The label name.
string $color The label color.

Return Value

object

object getComment( string $user, string $repo, integer $commentId)

Method to get a specific comment on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $commentId The comment id to get.

Return Value

object

array getComments( string $user, string $repo, integer $issueId, integer $page, integer $limit)

Method to get the list of comments on an issue.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
integer $issueId The issue number.
integer $page The page number from which to get items.
integer $limit The number of items on a page.

Return Value

array

object getLabel( string $user, string $repo, string $name)

Method to get a specific label on a repo.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.
string $name The label name to get.

Return Value

object

array getLabels( string $user, string $repo)

Method to get the list of labels on a repo.

Parameters

string $user The name of the owner of the GitHub repository.
string $repo The name of the GitHub repository.

Return Value

array