JGithubPackageIssuesLabels
Extends \JGithubPackageGitHub API Milestones class for the Joomla Platform.
documentation | |
---|---|
since |
3.1.4 |
deprecated |
4.0 Use the |
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.
add
Add labels to an issue.
add(string $owner, string $repo, string $number, array $labels) : object
since |
3.3 |
---|
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $number
string
The issue number.- $labels
array
An array of labels to add.
Response
object
create
Method to create a label on a repo.
create(string $owner, string $repo, string $name, string $color) : object
throws |
|
---|---|
since |
3.1.4 |
Arguments
- $owner
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
delete
Method to delete a label on a repo.
delete(string $owner, string $repo, string $name) : object
throws |
|
---|---|
since |
3.1.4 |
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $name
string
The label name.
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 specific label on a repo.
get(string $user, string $repo, string $name) : object
throws |
|
---|---|
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
getList
Method to get the list of labels on a repo.
getList(string $owner, string $repo) : array
throws |
|
---|---|
since |
3.1.4 |
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.
Response
array
getListByIssue
List labels on an issue.
getListByIssue(string $owner, string $repo, integer $number) : object
since |
3.3 |
---|
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $number
integer
The issue number.
Response
object
getListByMilestone
Get labels for every issue in a milestone.
getListByMilestone(string $owner, string $repo, string $number) : object
since |
3.3 |
---|
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $number
string
The issue number.
Response
object
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
removeAllFromIssue
removeAllFromIssue(string $owner, string $repo, string $number) : object
.* Remove all labels from an issue.
since |
3.3 |
---|
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $number
string
The issue number.
Response
object
removeFromIssue
Remove a label from an issue.
removeFromIssue(string $owner, string $repo, string $number, string $name) : object
since |
3.3 |
---|
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $number
string
The issue number.- $name
string
The name of the label to remove.
Response
object
replace
Replace all labels for an issue.
replace(string $owner, string $repo, string $number, array $labels) : object
Sending an empty array ([]) will remove all Labels from the Issue.
since |
3.3 |
---|
Arguments
- $owner
string
The name of the owner of the GitHub repository.- $repo
string
The name of the GitHub repository.- $number
string
The issue number.- $labels
array
New labels
Response
object
update
Method to update a label on a repo.
update(string $user, string $repo, string $label, string $name, string $color) : object
throws |
|
---|---|
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 new label name.- $color
string
The new label color.
Response
object
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.