Skip to content

Commit 83ee835

Browse files
authored
minor KnpLabs#987 Add missing repo hooks documentation (acrobat)
This PR was merged into the 2.x branch. Discussion ---------- Fixes KnpLabs#791 Commits ------- eec9015 Add missing repo hooks documentation
2 parents c03fd12 + eec9015 commit 83ee835

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

doc/repo/hooks.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Repo / Hooks API
2+
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
3+
4+
For extended info see the [Github documentation](https://docs.github.com/en/rest/reference/repos#webhooks)
5+
6+
### List repository webhooks
7+
8+
```php
9+
$hooks = $client->api('repo')->hooks()->all('twbs', 'bootstrap');
10+
```
11+
12+
### Get a repository webhook
13+
14+
```php
15+
$hook = $client->api('repo')->hooks()->show('twbs', 'bootstrap', $hookId);
16+
```
17+
18+
### Create a repository webhook
19+
20+
```php
21+
$client->api('repo')->hooks()->create('twbs', 'bootstrap', $parameters);
22+
```
23+
24+
### Update a repository webhook
25+
26+
```php
27+
$client->api('repo')->hooks()->update('twbs', 'bootstrap', $hookId, $parameters);
28+
```
29+
30+
### Delete a repository webhook
31+
32+
```php
33+
$client->api('repo')->hooks()->remove('twbs', 'bootstrap', $hookId);
34+
```
35+
36+
### Ping a repository webhook
37+
38+
```php
39+
$client->api('repo')->hooks()->ping('twbs', 'bootstrap', $hookId);
40+
```
41+
42+
### Test the push repository webhook
43+
44+
```php
45+
$client->api('repo')->hooks()->test('twbs', 'bootstrap', $hookId);
46+
```

0 commit comments

Comments
 (0)