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

        return $this->put('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/topics', ['names' => $topics]);
    }
public function replaceTopics($username, $repository, array $topics)
    {
        //This api is in preview mode, so set the correct accept-header
        $this->acceptHeaderValue = 'application/vnd.github.mercy-preview+json';

        return $this->put('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/topics', ['names' => $topics]);
    }
public function replaceTopics ( $ username , $ repository , array $ topics ) { //This api is in preview mode, so set the correct accept-header $ this -> acceptHeaderValue = 'application/vnd.github.mercy-preview+json' ; return $ this -> put ( '/repos/' . rawurldecode ( $ username ) . '/' . rawurldecode ( $ repository ) . '/topics' , [ 'names' => $ topics ] ) ; }
Replace all topics for a repository.

@link https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository

@param string $username
@param string $repository
@param array  $topics

@return array
Replace all topics for a repository .