Skip to content

Create statuses docs #377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 2, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions doc/repo/statuses.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Repo / Statuses API
[Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md)

### List all statuses for a commit

```php
$statuses = $client->api('repo')->statuses()->show('NimbleCI', 'docker-web-tester-behat', $commitSha);
```

### Get the combined statuses for a commit

```php
$statuses = $client->api('repo')->statuses()->combined('NimbleCI', 'docker-web-tester-behat', $commitSha);
```

### Create a status for a commit

For the full list of parameters see https://developer.github.com/v3/repos/statuses/#parameters

```php
$params = [
'state' => 'pending', # The 'state' element is required
'target_url' => 'https://nimbleci.com/...',
'description' => 'A great description...',
'context' => 'my-context',
];
$statuses = $client->api('repo')->statuses()->create('NimbleCI', 'docker-web-tester-behat', $commitSha, $params);
```