JGithubPackageIssuesLabels

Extends \JGithubPackage

GitHub API Milestones class for the Joomla Platform.

deprecated
documentation

https://developer.github.com/v3/issues/labels/

since

3.1.4

deprecated

4.0 Use the joomla/github package via Composer instead

package

Joomla.Platform

Methods

__construct

Constructor.

__construct(\Joomla\Registry\Registry $options = null, \JGithubHttp $client = null) 
inherited
since

1.7.3

Arguments

$options

\Joomla\Registry\RegistryGitHub options object.

$client

\JGithubHttpThe HTTP client object.

__get

Magic method to lazily create API objects

__get(string $name) : \JGithubPackage
inherited
since

3.3

throws

\RuntimeException

Arguments

$name

stringName of property to retrieve

Response

\JGithubPackageGitHub API package object.

add

Add labels to an issue.

add(string $owner, string $repo, string $number, array $labels) : object
since

3.3

Arguments

$owner

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$number

stringThe issue number.

$labels

arrayAn 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

\DomainException

since

3.1.4

Arguments

$owner

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$name

stringThe label name.

$color

stringThe label color.

Response

object

delete

Method to delete a label on a repo.

delete(string $owner, string $repo, string $name) : object
throws

\DomainException

since

3.1.4

Arguments

$owner

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$name

stringThe 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
inherited
since

1.7.3

Arguments

$path

stringURL to inflect

$page

integerPage to request

$limit

integerNumber of results to return per page

Response

stringThe request URL.

get

Method to get a specific label on a repo.

get(string $user, string $repo, string $name) : object
throws

\DomainException

since

3.1.4

Arguments

$user

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$name

stringThe label name to get.

Response

object

getList

Method to get the list of labels on a repo.

getList(string $owner, string $repo) : array
throws

\DomainException

since

3.1.4

Arguments

$owner

stringThe name of the owner of the GitHub repository.

$repo

stringThe 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

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$number

integerThe 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

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$number

stringThe issue number.

Response

object

processResponse

Process the response and decode it.

processResponse(\JHttpResponse $response, integer $expectedCode = 200, boolean $decode = true) : mixed
inherited
throws

\DomainException

since

3.3.0

Arguments

$response

\JHttpResponseThe response.

$expectedCode

integerThe expected "good" code.

$decode

booleanIf 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

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$number

stringThe 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

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$number

stringThe issue number.

$name

stringThe 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

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$number

stringThe issue number.

$labels

arrayNew 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

\DomainException

since

3.1.4

Arguments

$user

stringThe name of the owner of the GitHub repository.

$repo

stringThe name of the GitHub repository.

$label

stringThe label name.

$name

stringThe new label name.

$color

stringThe new label color.

Response

object

Properties

name

inherited
since

3.3

Type(s)

string

packages

inherited
since

3.3

Type(s)

array

options

Options for the GitHub object.

inherited
since

1.7.3

Type(s)

\Joomla\Registry\Registry

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.7.3

Type(s)

\JGithubHttp