-
-
Notifications
You must be signed in to change notification settings - Fork 598
Add the repository transfer endpoint #699
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
Conversation
Thanks @m1guelpf! Can you just add docs entry for this endpoint and update the changelog to describe this added feature. |
@acrobat Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a minor
lib/Github/Api/Repo.php
Outdated
* | ||
* @return array | ||
*/ | ||
public function transfer($username, $repository, $new_owner, $team_id = []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use camelCase and not snake_case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GrahamCampbell Is there any configuration in StyleCI that would allow us to force camel case?
@Nyholm Fixed! |
doc/repos.md
Outdated
### Transfer a repo to another user | ||
|
||
```php | ||
$currentTopics = $client->api('repo')->transfer('KnpLabs', 'php-github-api', 'github'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a correct variable name (or remove it if the api does not return anything)
doc/repos.md
Outdated
You can optionally assign some teams by passing an array with their ID's if you're transferring the repo to an organization: | ||
|
||
```php | ||
$currentTopics = $client->api('repo')->transfer('KnpLabs', 'php-github-api', 'github', [1234]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Changes look good! Just 2 minor comments
@acrobat Done! |
Thanks @m1guelpf! |
This PR adds the repo transfer endpoint to the client.
Documentation: https://developer.github.com/v3/repos/#transfer-a-repository