Skip to content

Commit 70f16ec

Browse files
committed
Added documentation for managing labels.
1 parent f31725f commit 70f16ec

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

doc/issue/labels.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,33 @@ $labels = $client->api('issue')->labels()->all('KnpLabs', 'php-github-api');
1212
List all project labels by username and repo.
1313
Returns an array of project labels.
1414

15+
### Create a label
16+
17+
```php
18+
$labels = $client->api('issue')->labels()->create('KnpLabs', 'php-github-api', array(
19+
'name' => 'Bug',
20+
'color' => 'FFFFFF',
21+
));
22+
```
23+
24+
Create a new label in the repository.
25+
26+
### Update a label
27+
28+
```php
29+
$labels = $client->api('issue')->labels()->update('KnpLabs', 'php-github-api', 'Enhancement', 'Feature', 'FFFFFF');
30+
```
31+
32+
Update the label name and color.
33+
34+
### Delete a label
35+
36+
```php
37+
$labels = $client->api('issue')->labels()->deleteLabel('KnpLabs', 'php-github-api', 'Bug');
38+
```
39+
40+
Delete a new label from the repository.
41+
1542
### Add a label on an issue
1643

1744
> Requires [authentication](../security.md).

0 commit comments

Comments
 (0)