Skip to content

Commit 29939bb

Browse files
committed
Merge pull request #377 from emmetog/patch-1
Create statuses docs
2 parents fe91371 + 6975ba7 commit 29939bb

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

doc/repo/statuses.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Repo / Statuses API
2+
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)
3+
4+
### List all statuses for a commit
5+
6+
```php
7+
$statuses = $client->api('repo')->statuses()->show('NimbleCI', 'docker-web-tester-behat', $commitSha);
8+
```
9+
10+
### Get the combined statuses for a commit
11+
12+
```php
13+
$statuses = $client->api('repo')->statuses()->combined('NimbleCI', 'docker-web-tester-behat', $commitSha);
14+
```
15+
16+
### Create a status for a commit
17+
18+
For the full list of parameters see https://developer.github.com/v3/repos/statuses/#parameters
19+
20+
```php
21+
$params = [
22+
'state' => 'pending', # The 'state' element is required
23+
'target_url' => 'https://nimbleci.com/...',
24+
'description' => 'A great description...',
25+
'context' => 'my-context',
26+
];
27+
$statuses = $client->api('repo')->statuses()->create('NimbleCI', 'docker-web-tester-behat', $commitSha, $params);
28+
```

0 commit comments

Comments
 (0)