client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/forks'); return \GuzzleHttp\json_decode($response->getBody(), true); } /** * @param string $owner * @param string $repositoryName * @param string|null $organisation * @return array */ public function createFork(string $owner, string $repositoryName, string $organisation = null): array { $options['json'] = [ 'organization' => $organisation ]; $options['json'] = $this->removeNullValues($options['json']); $response = $this->client->request(self::BASE_URI . '/' . $owner . '/' . $repositoryName . '/forks', 'POST', $options); return \GuzzleHttp\json_decode($response->getBody(), true); } }