Skip to content

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

Merged
merged 10 commits into from
Mar 25, 2018
Merged

Add the repository transfer endpoint #699

merged 10 commits into from
Mar 25, 2018

Conversation

m1guelpf
Copy link
Contributor

@m1guelpf m1guelpf commented Mar 23, 2018

This PR adds the repo transfer endpoint to the client.
Documentation: https://developer.github.com/v3/repos/#transfer-a-repository

:octocat:

@acrobat
Copy link
Collaborator

acrobat commented Mar 23, 2018

Thanks @m1guelpf! Can you just add docs entry for this endpoint and update the changelog to describe this added feature.

@m1guelpf
Copy link
Contributor Author

@acrobat Done!

Copy link
Collaborator

@Nyholm Nyholm left a 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

*
* @return array
*/
public function transfer($username, $repository, $new_owner, $team_id = [])
Copy link
Collaborator

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

Copy link
Collaborator

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?

@m1guelpf
Copy link
Contributor Author

@Nyholm Fixed!

@m1guelpf
Copy link
Contributor Author

@Nyholm @acrobat Status?

doc/repos.md Outdated
### Transfer a repo to another user

```php
$currentTopics = $client->api('repo')->transfer('KnpLabs', 'php-github-api', 'github');
Copy link
Collaborator

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]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Collaborator

@acrobat acrobat left a 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

@m1guelpf
Copy link
Contributor Author

@acrobat Done!

@acrobat
Copy link
Collaborator

acrobat commented Mar 25, 2018

Thanks @m1guelpf!

@acrobat acrobat merged commit 5046093 into KnpLabs:master Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants