JGithubPackageIssues
Extends \JGithubPackageGitHub API Issues class for the Joomla Platform.
documentation | |
---|---|
since |
1.7.3 |
deprecated |
4.0 Use the |
property-read |
GitHub API object for assignees. GitHub API object for comments. GitHub API object for events. GitHub API object for labels. GitHub API object for milestones. |
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry $options = null, \JGithubHttp $client = null)
since |
1.7.3 |
---|
Arguments
- $options
\Joomla\Registry\Registry
GitHub options object.- $client
\JGithubHttp
The HTTP client object.
__get
Magic method to lazily create API objects
__get(string $name) : \JGithubPackage
since |
3.3 |
---|---|
throws |
|
Arguments
- $name
string
Name of property to retrieve
Response
\JGithubPackage
GitHub API package object.
create
Method to create an issue.
create(string $user, string $repo, string $title, string $body = null, string $assignee = null, integer $milestone = null, array $labels = null) : object
throws |
|
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $title
string
The title of the new issue.- $body
string
The body text for the new issue.- $assignee
string
The login for the GitHub user that this issue should be assigned to.- $milestone
integer
The milestone to associate this issue with.- $labels
array
The labels to associate with this issue.
Response
object
createComment
Method to create a comment on an issue.
createComment(string $user, string $repo, integer $issueId, string $body) : object
deprecated |
use issues->comments->create() |
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $issueId
integer
The issue number.- $body
string
The comment body text.
Response
object
createLabel
Method to create a label on a repo.
createLabel(string $user, string $repo, string $name, string $color) : object
deprecated |
use issues->labels->create() |
---|---|
since |
3.1.4 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $name
string
The label name.- $color
string
The label color.
Response
object
deleteComment
Method to delete a comment on an issue.
deleteComment(string $user, string $repo, integer $commentId) : void
deprecated |
use issues->comments->delete() |
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $commentId
integer
The id of the comment to delete.
deleteLabel
Method to delete a label on a repo.
deleteLabel(string $user, string $repo, string $label) : object
deprecated |
use issues->labels->delete() |
---|---|
since |
3.1.4 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $label
string
The label name.
Response
object
edit
Method to update an issue.
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) : object
throws |
|
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $issueId
integer
The issue number.- $state
string
The optional new state for the issue. [open, closed]- $title
string
The title of the new issue.- $body
string
The body text for the new issue.- $assignee
string
The login for the GitHub user that this issue should be assigned to.- $milestone
integer
The milestone to associate this issue with.- $labels
array
The labels to associate with this issue.
Response
object
editComment
Method to update a comment on an issue.
editComment(string $user, string $repo, integer $commentId, string $body) : object
deprecated |
use issues->comments->edit() |
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $commentId
integer
The id of the comment to update.- $body
string
The new body text for the comment.
Response
object
editLabel
Method to update a label on a repo.
editLabel(string $user, string $repo, string $label, string $name, string $color) : object
deprecated |
use issues->labels->update() |
---|---|
since |
3.1.4 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $label
string
The label name.- $name
string
The label name.- $color
string
The label color.
Response
object
fetchUrl
Method to build and return a full request URL for the request. This method will add appropriate pagination details if necessary and also prepend the API url to have a complete URL for the request.
fetchUrl(string $path, integer $page, integer $limit) : string
since |
1.7.3 |
---|
Arguments
- $path
string
URL to inflect- $page
integer
Page to request- $limit
integer
Number of results to return per page
Response
string
The request URL.
get
Method to get a single issue.
get(string $user, string $repo, integer $issueId) : object
throws |
|
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $issueId
integer
The issue number.
Response
object
getComment
Method to get a specific comment on an issue.
getComment(string $user, string $repo, integer $commentId) : object
deprecated |
use issues->comments->get() |
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $commentId
integer
The comment id to get.
Response
object
getComments
Method to get the list of comments on an issue.
getComments(string $user, string $repo, integer $issueId, integer $page, integer $limit) : array
deprecated |
use issues->comments->getList() |
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $issueId
integer
The issue number.- $page
integer
The page number from which to get items.- $limit
integer
The number of items on a page.
Response
array
getLabel
Method to get a specific label on a repo.
getLabel(string $user, string $repo, string $name) : object
deprecated |
use issues->labels->get() |
---|---|
since |
3.1.4 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $name
string
The label name to get.
Response
object
getLabels
Method to get the list of labels on a repo.
getLabels(string $user, string $repo) : array
deprecated |
use issues->labels->getList() |
---|---|
since |
3.1.4 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.
Response
array
getList
Method to list an authenticated user's issues.
getList(string $filter = null, string $state = null, string $labels = null, string $sort = null, string $direction = null, \JDate $since = null, integer $page, integer $limit) : array
throws |
|
---|---|
since |
1.7.3 |
Arguments
- $filter
string
The filter type: assigned, created, mentioned, subscribed.- $state
string
The optional state to filter requests by. [open, closed]- $labels
string
The list of comma separated Label names. Example: bug,ui,@high.- $sort
string
The sort order: created, updated, comments, default: created.- $direction
string
The list direction: asc or desc, default: desc.- $since
\JDate
The date/time since when issues should be returned.- $page
integer
The page number from which to get items.- $limit
integer
The number of items on a page.
Response
array
getListByRepository
Method to list issues.
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) : array
throws |
|
---|---|
since |
1.7.3 |
Arguments
- $user
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $milestone
string
The milestone number, 'none', or *.- $state
string
The optional state to filter requests by. [open, closed]- $assignee
string
The assignee name, 'none', or *.- $mentioned
string
The GitHub user name.- $labels
string
The list of comma separated Label names. Example: bug,ui,@high.- $sort
string
The sort order: created, updated, comments, default: created.- $direction
string
The list direction: asc or desc, default: desc.- $since
\JDate
The date/time since when issues should be returned.- $page
integer
The page number from which to get items.- $limit
integer
The number of items on a page.
Response
array
processResponse
Process the response and decode it.
processResponse(\JHttpResponse $response, integer $expectedCode = 200, boolean $decode = true) : mixed
throws |
|
---|---|
since |
3.3.0 |
Arguments
- $response
\JHttpResponse
The response.- $expectedCode
integer
The expected "good" code.- $decode
boolean
If the should be response be JSON decoded.
Response
mixed
Properties
name
since |
3.3 |
---|
Type(s)
string
packages
since |
3.3 |
---|
Type(s)
array
client
The HTTP client object to use in sending HTTP requests.
assignees
GitHub API object for assignees.
Type(s)
\JGithubPackageIssuesAssignees
comments
GitHub API object for comments.
Type(s)
\JGithubPackageIssuesComments
events
GitHub API object for events.
Type(s)
\JGithubPackageIssuesEvents
labels
GitHub API object for labels.
Type(s)
\JGithubPackageIssuesLabels
milestones
GitHub API object for milestones.
Type(s)
\JGithubPackageIssuesMilestones