lib/GitHub/Receiver/Repositories/Collaborators.php
public function checkUserIsACollaborator(string $username): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/collaborators/:username',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $username));

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
public function checkUserIsACollaborator(string $username): bool
    {
        $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/collaborators/:username',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo(), $username));

        if ($this->getApi()->getHeaders()['Status'] == '204 No Content') {
            return true;
        }

        return false;
    }
public function checkUserIsACollaborator ( string $ username ) : bool { $ this -> getApi ( ) -> request ( $ this -> getApi ( ) -> sprintf ( '/repos/:owner/:repo/collaborators/:username' , $ this -> getRepositories ( ) -> getOwner ( ) , $ this -> getRepositories ( ) -> getRepo ( ) , $ username ) ) ; if ( $ this -> getApi ( ) -> getHeaders ( ) [ 'Status' ] == '204 No Content' ) { return true ; } return false ; }
Check if a user is a collaborator

@link https://developer.github.com/v3/repos/collaborators/#get

@param string $username

@return bool
Check if a user is a collaborator