Skip to content

Commit ee45d48

Browse files
committed
Add note about moved repositories
1 parent 4f3a34d commit ee45d48

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/repos.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,14 @@ $activity = $client->api('repo')->activity('ornicar', 'php-github-api');
238238
```
239239

240240
Returns an array of commit activity group by week.
241+
242+
### `Moved` repositories
243+
Github repositories can be moved to another org/user, but it remains the `id`.
244+
In case if you can't no more find repo, you can retrieve it by `id`:
245+
246+
```php
247+
use Github\HttpClient\Message\ResponseMediator;
248+
249+
$data = $client->getHttpClient()->get('/repositories/24560307');
250+
$repo = ResponseMediator::getContent($data);
251+
```

0 commit comments

Comments
 (0)