Skip to content

Commit 99f32a0

Browse files
committed
Merge pull request #346 from markbiek/repos-doc-update
Added examples for manipulating repository hooks
2 parents c65d8bd + 80897c8 commit 99f32a0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/repos.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,30 @@ $client->api('repo')->keys()->remove('username', 'reponame', 12345);
136136

137137
Removes the key with id 12345 from the 'reponame' repository and returns a list of the deploy keys for the repository.
138138

139+
### Add a hook to a repository
140+
141+
> Requires [authentication](security.md).
142+
143+
```php
144+
$client->api('repo')->hooks()->create('username', 'reponame', $params);
145+
```
146+
147+
### Remove a hook from a repository
148+
149+
> Requires [authentication](security.md).
150+
151+
```php
152+
$client->api('repo')->hooks()->remove('username', 'reponame', $id);
153+
```
154+
155+
### Return a list of all hooks for the 'reponame' repository
156+
157+
> Requires [authentication](security.md).
158+
159+
```php
160+
$client->api('repo')->hooks()->show('username', 'reponame');
161+
```
162+
139163
### Get the collaborators for a repository
140164

141165
```php

0 commit comments

Comments
 (0)