Skip to content

Commit debf2b3

Browse files
committed
Merge branch 'master' into patch-2
# Conflicts: # lib/Github/Api/Repository/Comments.php
2 parents a45ce63 + 9b66e47 commit debf2b3

39 files changed

+974
-8
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5-
## 2.0.2
5+
## 2.1.0
6+
7+
### Added
8+
9+
- Add support for retrieving a single notification info using his ID
10+
- Add a function to get user organizations
11+
- Added GraphQL support
12+
- Add page variable to organization repo list (Organization::repositories())
13+
- Add support for pull request review.
14+
- Add support for adding branch protection.
615

716
### Fixed
817

918
- Bug with double slashes when using enterprise URL.
19+
- Bug when headers not being passed to request (#529)
1020

1121
## 2.0.0
1222

doc/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ APIs:
1212
* [Comments](gists/comments.md)
1313
* [Integrations](integrations.md)
1414
* [Issues](issues.md)
15+
* [Assignees](issue/assignees.md)
1516
* [Comments](issue/comments.md)
1617
* [Labels](issue/labels.md)
18+
* [Milestones](issue/milestones.md)
19+
* Miscellaneous
20+
* [Emojis](miscellaneous/emojis.md)
21+
* [Gitignore](miscellaneous/gitignore.md)
22+
* [Markdown](miscellaneous/markdown.md)
1723
* [Organization](organization.md)
1824
* [Members](organization/members.md)
1925
* [Teams](organization/teams.md)
@@ -42,3 +48,4 @@ Additional features:
4248
* [Request any Route](request_any_route.md)
4349
* [Customize `php-github-api`](customize.md)
4450
* [Running and writing tests](testing.md)
51+
* [Request / Response info](request_response_info.md)

doc/issue/assignees.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Issues / Assignees API
2+
[Back to the "Issues API"](../issues.md) | [Back to the navigation](../README.md)
3+
4+
Wraps [GitHub Issue Assignees API](https://developer.github.com/v3/issues/assignees/).
5+
6+
### List all available assignees
7+
8+
```php
9+
$assignees = $client->api('issue')->assignees()->listAvailable('KnpLabs', 'php-github-api');
10+
```
11+
12+
### Check if a user is an available assignee
13+
14+
```php
15+
$info = $client->api('issue')->assignees()->check('KnpLabs', 'php-github-api', 'test-user);
16+
```
17+
18+
### Add assignee
19+
20+
```php
21+
$client->api('issue')->assignees()->add('KnpLabs', 'php-github-api', 4, ['assignees' => 'test-user]);
22+
```
23+
24+
### Remove assignee
25+
26+
```php
27+
$client->api('issue')->assignees()->remove('KnpLabs', 'php-github-api', 4, ['assignees' => 'test-user]);
28+
```

doc/issue/labels.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ $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+
### Get a single label
16+
17+
```php
18+
$label = $client->api('issue')->labels()->all('KnpLabs', 'php-github-api', 'label1');
19+
```
20+
1521
### Create a label
1622

1723
```php

doc/issues.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,15 @@ $client->api('issue')->all('KnpLabs', 'php-github-api', array('labels' => 'label
8484
```
8585

8686
Returns an array of issues matching the given label.
87+
88+
### Lock an issue discussion
89+
90+
```php
91+
$client->api('issue')->lock('KnpLabs', 'php-github-api', 4);
92+
```
93+
94+
### Unlock an issue discussion
95+
96+
```php
97+
$client->api('issue')->unlock('KnpLabs', 'php-github-api', 4);
98+
```

doc/miscellaneous/emojis.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Emojis API
2+
[Back to the navigation](../README.md)
3+
4+
### Lists all available emojis on GitHub.
5+
6+
```php
7+
$emojis = $client->api('emojis')->all();
8+
```

doc/miscellaneous/gitignore.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Gitignore API
2+
[Back to the navigation](../README.md)
3+
4+
### Lists all available gitignore templates
5+
6+
```php
7+
$gitignoreTemplates = $client->api('gitignore')->all();
8+
```
9+
10+
### Get a single template
11+
12+
```php
13+
$gitignore = $client->api('gitignore')->show('C');
14+
```

doc/miscellaneous/markdown.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Markdown API
2+
[Back to the navigation](../README.md)
3+
4+
### Render an arbitrary Markdown document
5+
6+
```php
7+
$gitignoreTemplates = $client->api('markdown')->render('Hello world github/linguist#1 **cool**, and #1!', 'markdown');
8+
```
9+
10+
### Render a Markdown document in raw mode
11+
12+
```php
13+
$gitignore = $client->api('markdown')->renderRaw('path/to/file');
14+
```

doc/pull_request/review_request.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Pull Requests / Review Requests API
2+
[Back to the "Pull Requests API"](../pull_requests.md) | [Back to the navigation](../README.md)
3+
4+
The Pull Request Review API is currently available for developers to preview.
5+
To access the API during the preview period, you must provide a custom media type in the Accept header:
6+
7+
```php
8+
$client->api('pull_request')->reviewRequests()->configure();
9+
```
10+
11+
### List all review requests
12+
13+
```php
14+
$reviewRequests = $client->api('pull_request')->reviewRequests()->all('twbs', 'bootstrap', 12);
15+
```
16+
17+
### Create a review request
18+
19+
```php
20+
$client->api('pull_request')->reviewRequests()->create('twbs', 'bootstrap', 12, array('user1', 'user2'));
21+
```
22+
23+
### Remove a review request
24+
25+
```php
26+
$client->api('pull_request')->reviewRequests()->remove('twbs', 'bootstrap', 12, array('user1', 'user2'));
27+
```

doc/request_response_info.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Request / Response information
2+
[Back to the navigation](README.md)
3+
4+
### Get response headers
5+
6+
Get the repsonse header for the latest request
7+
8+
```
9+
$headers = $githubClient->getLastResponse()->getHeaders();
10+
//Example headers
11+
$headers['X-RateLimit-Remaining'];
12+
$headers['X-OAuth-Scopes'];
13+
$headers['X-Accepted-OAuth-Scopes'];
14+
```

0 commit comments

Comments
 (0)