lib/Github/Api/Repo.php
public function transfer($username, $repository, $newOwner, $teamId = [])
    {
        //This api is in preview mode, so set the correct accept-header
        $this->acceptHeaderValue = 'application/vnd.github.nightshade-preview+json';

        return $this->post('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/transfer', ['new_owner' => $newOwner, 'team_id' => $teamId]);
    }
public function transfer($username, $repository, $newOwner, $teamId = [])
    {
        //This api is in preview mode, so set the correct accept-header
        $this->acceptHeaderValue = 'application/vnd.github.nightshade-preview+json';

        return $this->post('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/transfer', ['new_owner' => $newOwner, 'team_id' => $teamId]);
    }
public function transfer ( $ username , $ repository , $ newOwner , $ teamId = [ ] ) { //This api is in preview mode, so set the correct accept-header $ this -> acceptHeaderValue = 'application/vnd.github.nightshade-preview+json' ; return $ this -> post ( '/repos/' . rawurldecode ( $ username ) . '/' . rawurldecode ( $ repository ) . '/transfer' , [ 'new_owner' => $ newOwner , 'team_id' => $ teamId ] ) ; }
Transfer a repository.

@link https://developer.github.com/v3/repos/#transfer-a-repository

@param string $username
@param string $repository
@param string $newOwner
@param array  $teamId

@return array
Transfer a repository .