Skip to content

Commit 53d5ea3

Browse files
authored
Update deployments.md
1 parent 06787a1 commit 53d5ea3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

doc/repo/deployments.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $deployments = $client->api('deployment')->all('KnpLabs', 'php-github-api', arra
2121
$deployment = $client->api('deployment')->show('KnpLabs', 'php-github-api', $id);
2222
```
2323

24-
#### Create a new deployments.
24+
#### Create a new deployment.
2525

2626
The `ref` parameter is required.
2727

@@ -31,9 +31,19 @@ $data = $client->api('deployment')->create('KnpLabs', 'php-github-api', array('r
3131

3232
Please note that once a deployment is created it cannot be edited. Only status updates can be created.
3333

34+
#### Delete a existing deployment.
35+
36+
```php
37+
$deployment = $client->api('deployment')->show('KnpLabs', 'php-github-api', $id);
38+
```
39+
40+
Please note that a deployment can only be deleted when in inactive state.
41+
Consider transitioning the status to `inactive` beforehand using `updateStatus`.
42+
43+
3444
#### Create a new status update.
3545

36-
The `state` parameter is required. At the time of writing, this must be pending, success, error, or failure.
46+
The `state` parameter is required. At the time of writing, this must be pending, queued, in_progress, success, inactive, error, or failure.
3747

3848
```php
3949
$data = $client->api('deployment')->updateStatus('KnpLabs', 'php-github-api', 1, array('state' => 'error', 'description' => 'syntax error'));

0 commit comments

Comments
 (0)