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

        return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/community/code_of_conduct');
    }
public function codeOfConduct($username, $repository)
    {
        //This api is in preview mode, so set the correct accept-header
        $this->acceptHeaderValue = 'application/vnd.github.scarlet-witch-preview+json';

        return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/community/code_of_conduct');
    }
public function codeOfConduct ( $ username , $ repository ) { //This api is in preview mode, so set the correct accept-header $ this -> acceptHeaderValue = 'application/vnd.github.scarlet-witch-preview+json' ; return $ this -> get ( '/repos/' . rawurldecode ( $ username ) . '/' . rawurldecode ( $ repository ) . '/community/code_of_conduct' ) ; }
Get the contents of a repository's code of conduct.

@link https://developer.github.com/v3/codes_of_conduct/#get-the-contents-of-a-repositorys-code-of-conduct

@param string $username
@param string $repository

@return array
Get the contents of a repository s code of conduct .