Method to create a hook on a repository.
object
create
(string $user, string $repo, string $name, array $config, [array $events = array('push')], [boolean $active = true])
-
string
$user: The name of the owner of the GitHub repository.
-
string
$repo: The name of the GitHub repository.
-
string
$name: The name of the service being called.
-
array
$config: Array containing the config for the service.
-
array
$events: The events the hook will be triggered for.
-
boolean
$active: Flag to determine if the hook is active
Method to delete a hook
object
delete
(string $user, string $repo, integer $id)
-
string
$user: The name of the owner of the GitHub repository.
-
string
$repo: The name of the GitHub repository.
-
integer
$id: ID of the hook to delete.
Method to edit a hook.
object
edit
(string $user, string $repo, integer $id, string $name, array $config, [array $events = array('push')], [array $addEvents = array()], [array $removeEvents = array()], [boolean $active = true])
-
string
$user: The name of the owner of the GitHub repository.
-
string
$repo: The name of the GitHub repository.
-
integer
$id: ID of the hook to edit.
-
string
$name: The name of the service being called.
-
array
$config: Array containing the config for the service.
-
array
$events: The events the hook will be triggered for. This resets the currently set list
-
array
$addEvents: Events to add to the hook.
-
array
$removeEvents: Events to remove from the hook.
-
boolean
$active: Flag to determine if the hook is active
Method to get details about a single hook for the repository.
object
get
(string $user, string $repo, integer $id)
-
string
$user: The name of the owner of the GitHub repository.
-
string
$repo: The name of the GitHub repository.
-
integer
$id: ID of the hook to retrieve
Method to list hooks for a repository.
object
getList
(string $user, string $repo, [integer $page = 0], [integer $limit = 0])
-
string
$user: The name of the owner of the GitHub repository.
-
string
$repo: The name of the GitHub repository.
-
integer
$page: Page to request
-
integer
$limit: Number of results to return per page
Method to test a hook against the latest repository commit
object
test
(string $user, string $repo, integer $id)
-
string
$user: The name of the owner of the GitHub repository.
-
string
$repo: The name of the GitHub repository.
-
integer
$id: ID of the hook to delete
Inherited Methods
Inherited From JGithubObject
JGithubObject::__construct()
JGithubObject::fetchUrl()
JGithubObject::processResponse()