Releases
Extends AbstractPackageGitHub API References class for the Joomla Platform.
link | |
---|---|
since |
1.1.0 |
package |
Joomla Framework |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry options = null, \Joomla\Http\Http client = null) : mixed
since |
1.0 |
---|
Arguments
- options
\Joomla\Registry\Registry
GitHub options object.- client
\Joomla\Http\Http
The HTTP client object.
Response
mixed
__get
Magic method to lazily create API objects
__get(string name) : \Joomla\Github\AbstractPackage
since |
1.0 |
---|---|
throws |
|
Arguments
- name
string
Name of property to retrieve
Response
\Joomla\Github\AbstractPackage
GitHub API package object.
create
Create a release.
create(string user, string repo, string tagName, string targetCommitish = '', string name = '', string body = '', bool draft = false, bool preRelease = false) : object
link | |
---|---|
since |
1.1.0 |
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- tagName
string
The name of the tag.- targetCommitish
string
The commitish value that determines where the Git tag is created from.- name
string
The name of the release.- body
string
Text describing the contents of the tag.- draft
bool
True to create a draft (unpublished) release, false to create a published one.- preRelease
bool
True to identify the release as a prerelease. false to identify the release as a full release.
Response
object
delete
Delete a release.
delete(string owner, string repo, int releaseId) : object
since |
1.4.0 |
---|
Arguments
- owner
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- releaseId
int
The release id.
Response
object
deleteAsset
Delete a release asset.
deleteAsset(string user, string repo, int assetId) : bool
since |
1.4.0 |
---|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- assetId
int
The asset id.
Response
bool
edit
Edit a release.
edit(string user, string repo, int releaseId, string tagName, string targetCommitish = null, string name = null, bool body = null, bool draft = null, string preRelease = null) : object
link | |
---|---|
since |
1.1.0 |
throws |
|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- releaseId
int
The release id.- tagName
string
The name of the tag.- targetCommitish
string
The commitish value that determines where the Git tag is created from.- name
string
The branch (or git ref) you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repo that requests a merge to a base of another repo.- body
bool
The body text for the new pull request.- draft
bool
The branch (or git ref) where your changes are implemented.- preRelease
string
The branch (or git ref) where your changes are implemented.
Response
object
editAsset
Edit a release asset.
editAsset(string user, string repo, int assetId, string name, string label = '') : object
since |
1.4.0 |
---|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- assetId
int
The asset id.- name
string
The file name of the asset.- label
string
An alternate short description of the asset. Used in place of the filename.
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, int page, int limit) : \Joomla\Uri\Uri
since |
1.0 |
---|
Arguments
- path
string
URL to inflect- page
int
Page to request- limit
int
Number of results to return per page
Response
\Joomla\Uri\Uri
get
Get a single release.
get(string user, string repo, string ref) : object
since |
1.1.0 |
---|---|
throws |
|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- ref
string
Valid values are: 'latest', 'tags/2.0.24' or Release Id, for example: '1643513'
Response
object
getAsset
Get a single release asset.
getAsset(string user, string repo, int assetId) : object
since |
1.4.0 |
---|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- assetId
int
The asset id.
Response
object
getByTag
Get a release by tag name.
getByTag(string user, string repo, string tag) : object
since |
1.4.0 |
---|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- tag
string
The name of the tag.
Response
object
getLatest
Get the latest release.
getLatest(string user, string repo) : object
View the latest published full release for the repository. Draft releases and prereleases are not returned by this endpoint.
since |
1.4.0 |
---|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.
Response
object
getList
List releases for a repository.
getList(string user, string repo, int page, int limit) : array
since |
1.1.0 |
---|---|
throws |
|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- page
int
The page number from which to get items.- limit
int
The number of items on a page.
Response
array
An associative array of releases keyed by the tag name.
getListAssets
List assets for a release.
getListAssets(string user, string repo, int releaseId, int page, int limit) : object
since |
1.4.0 |
---|
Arguments
- user
string
The name of the owner of the GitHub repository.- repo
string
The name of the GitHub repository.- releaseId
int
The release id.- page
int
The page number from which to get items.- limit
int
The number of items on a page.
Response
object
processResponse
Process the response and decode it.
processResponse(\Joomla\Http\Response response, int expectedCode = 200) : mixed
since |
1.0 |
---|---|
throws |
|
Arguments
- response
\Joomla\Http\Response
The response.- expectedCode
int
The expected "good" code.
Response
mixed
Properties
options
Options for the GitHub object.
since |
1.0 |
---|
Type(s)
\Joomla\Registry\Registry
client
The HTTP client object to use in sending HTTP requests.
since |
1.0 |
---|
Type(s)
\Joomla\Http\Http
package
The package the object resides in
since |
1.0 |
---|
Type(s)
string
hookEvents
Array containing the allowed hook events
since |
1.5.2 |
---|---|
link | |
note |
From 1.4.0 to 1.5.1 this was named $events, it was renamed due to naming conflicts with package subclasses |
Type(s)
array