|
| create ($user, $repo, $name, array $config, array $events=array('push'), $active=true) |
|
| delete ($user, $repo, $id) |
|
| edit ($user, $repo, $id, $name, array $config, array $events=array('push'), array $addEvents=array(), array $removeEvents=array(), $active=true) |
|
| get ($user, $repo, $id) |
|
| getList ($user, $repo, $page=0, $limit=0) |
|
| test ($user, $repo, $id) |
|
| __construct (Registry $options=null, JGithubHttp $client=null) |
|
GitHub API Hooks class for the Joomla Platform.
- Depuis
- 3.1.4
- Obsolète:
- 4.0 Use the
joomla/github
package via Composer instead
◆ create()
create |
( |
|
$user, |
|
|
|
$repo, |
|
|
|
$name, |
|
|
array |
$config, |
|
|
array |
$events = array('push') , |
|
|
|
$active = true |
|
) |
| |
Method to create a hook on a repository.
- Paramètres
-
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 |
- Obsolète:
- use repositories->hooks->create()
- Renvoie
- object
- Depuis
- 3.1.4
- Exceptions
-
DomainException | |
RuntimeException | |
Références $active, $config, $data, $name, $path, $user, et json_encode.
◆ delete()
delete |
( |
|
$user, |
|
|
|
$repo, |
|
|
|
$id |
|
) |
| |
Method to delete a hook
- Paramètres
-
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. |
- Obsolète:
- use repositories->hooks->delete()
- Renvoie
- object
- Depuis
- 3.1.4
- Exceptions
-
Références $id, $path, et $user.
◆ edit()
edit |
( |
|
$user, |
|
|
|
$repo, |
|
|
|
$id, |
|
|
|
$name, |
|
|
array |
$config, |
|
|
array |
$events = array('push') , |
|
|
array |
$addEvents = array() , |
|
|
array |
$removeEvents = array() , |
|
|
|
$active = true |
|
) |
| |
Method to edit a hook.
- Paramètres
-
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 |
- Obsolète:
- use repositories->hooks->edit()
- Renvoie
- object
- Depuis
- 3.1.4
- Exceptions
-
DomainException | |
RuntimeException | |
Références $active, $config, $data, $id, $name, $path, $user, et json_encode.
◆ get()
get |
( |
|
$user, |
|
|
|
$repo, |
|
|
|
$id |
|
) |
| |
Method to get details about a single hook for the repository.
- Paramètres
-
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 |
- Obsolète:
- use repositories->hooks->get()
- Renvoie
- object
- Depuis
- 3.1.4
- Exceptions
-
Références $id, $path, et $user.
◆ getList()
getList |
( |
|
$user, |
|
|
|
$repo, |
|
|
|
$page = 0 , |
|
|
|
$limit = 0 |
|
) |
| |
Method to list hooks for a repository.
- Paramètres
-
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 |
- Obsolète:
- use repositories->hooks->getList()
- Renvoie
- object
- Depuis
- 3.1.4
- Exceptions
-
Références $path, et $user.
◆ test()
test |
( |
|
$user, |
|
|
|
$repo, |
|
|
|
$id |
|
) |
| |
Method to test a hook against the latest repository commit
- Paramètres
-
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 |
- Obsolète:
- use repositories->hooks->test()
- Renvoie
- object
- Depuis
- 3.1.4
- Exceptions
-
Références $id, $path, $user, et json_encode.
◆ $events
Valeur initiale := array(
'push',
'issues',
'issue_comment',
'commit_comment',
'pull_request',
'gollum',
'watch',
'download',
'fork',
'fork_apply',
'member',
'public',
'status',
)
La documentation de cette classe a été générée à partir du fichier suivant :