public function create($owner, $repo, $org = '')
	{
		// Build the request path.
		$path = '/repos/' . $owner . '/' . $repo . '/forks';

		if (strlen($org) > 0)
		{
			$data = json_encode(
				array('org' => $org)
			);
		}
		else
		{
			$data = json_encode(array());
		}

		// Send the request.
		return $this->processResponse($this->client->post($this->fetchUrl($path), $data), 202);
	}
public function create($owner, $repo, $org = '')
	{
		// Build the request path.
		$path = '/repos/' . $owner . '/' . $repo . '/forks';

		if (strlen($org) > 0)
		{
			$data = json_encode(
				array('org' => $org)
			);
		}
		else
		{
			$data = json_encode(array());
		}

		// Send the request.
		return $this->processResponse($this->client->post($this->fetchUrl($path), $data), 202);
	}
public function create ( $ owner , $ repo , $ org = '' ) { // Build the request path. $ path = '/repos/' . $ owner . '/' . $ repo . '/forks' ; if ( strlen ( $ org ) > 0 ) { $ data = json_encode ( array ( 'org' => $ org ) ) ; } else { $ data = json_encode ( array ( ) ) ; } // Send the request. return $ this -> processResponse ( $ this -> client -> post ( $ this -> fetchUrl ( $ path ) , $ data ) , 202 ) ; }
Method to fork a repository.

@param   string  $owner  The name of the owner of the GitHub repository.
@param   string  $repo   The name of the GitHub repository.
@param   string  $org    The organization to fork the repo into. By default it is forked to the current user.

@return  object

@since   1.0
@throws  \DomainException
Method to fork a repository .