@link https://developer.github.com/v3/pulls/review_requests/#create-a-review-request

@param string $username
@param string $repository
@param int    $pullRequest
@param array  $reviewers

@return string
168378
public function create($username, $repository, $pullRequest, array $reviewers)
    {
        return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/requested_reviewers', ['reviewers' => $reviewers]);
    }
603336
public function show($username, $repository, $sha, $recursive = false)
    {
        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/trees/'.rawurlencode($sha), $recursive ? ['recursive' => 1] : []);
    }
1365221
public function checkFailures($username, Request $request)
    {
        $failures = $this->repository->findLockedFailuresMatching($username, $request->getClientIp());

        if (0 === count($failures)) {
            return $this;
        }

        if ($this->trials < count($failures) && $this->captcha->isSetup()) {
            $response = $this->captcha->bind($request);

            if (!$response->isValid()) {
                throw new RequireCaptchaException('Too many failures, require captcha');
            }

            foreach ($failures as $failure) {
                $failure->setLocked(false);
            }

            $this->em->flush($failures);
        }

        return $this;
    }
721443
def get_reviews(self, user_id):
    
    url = _REVIEWS_USER.format(c_api=_C_API_BEGINNING,
                                                api=_API_VERSION,
                                                user_id=user_id,
                                                at=self.access_token)
    return _get_request(url)
604822
def get_review_comment(self, id):
        
        assert isinstance(id, (int, long)), id
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self._parentUrl(self.url) + "/comments/" + str(id)
        )
        return github.PullRequestComment.PullRequestComment(self._requester, headers, data, completed=True)
972602
protected function getUser(UsersRepository $repo, $userLogin)
    {
        $userEntity = $repo->findOneBy(['username' => $userLogin]);
        if ($userEntity) {
            return $userEntity;
        }

        return $repo->findOneBy(['email' => $userLogin]);
    }
393050
public function remove($username, $repository, $id)
    {
        return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id));
    }
1168640
public function listAvailable($username, $repository, array $parameters = [])
    {
        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/assignees', $parameters);
    }
589864
def get_pr_review_status(pr: PullRequestDetails) -> Any:
    
    url = ("https://api.github.com/repos/{}/{}/pulls/{}/reviews"
           "?access_token={}".format(pr.repo.organization,
                                     pr.repo.name,
                                     pr.pull_id,
                                     pr.repo.access_token))
    response = requests.get(url)

    if response.status_code != 200:
        raise RuntimeError(
            'Get review failed. Code: {}. Content: {}.'.format(
                response.status_code, response.content))

    return json.JSONDecoder().decode(response.content.decode())
856190
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]);
    }
867845
public function listUserRepositories(string $username, string $type = AbstractApi::TYPE_OWNER,
                                         string $sort = AbstractApi::SORT_FULL_NAME,
                                         string $direction = AbstractApi::DIRECTION_DESC): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/users/:username/repos?:args', $username,
            http_build_query(['type' => $type, 'sort' => $sort, 'direction' => $direction])));
    }
93886
public function transfer($username, $repository, $newOwner, $teamId = [])
    {
        //This api is in preview mode, so set the correct accept-header
        $this->acceptHeaderValue = 'application/vnd.github.nightshade-preview+json';

        return $this->post('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/transfer', ['new_owner' => $newOwner, 'team_id' => $teamId]);
    }
922281
public static function get_by_github_username($github_username) {
	$mysql = bootstrap::get_library('mysql');
	
	$sql   = "SELECT * FROM `login_github` WHERE `github_username` = '%s';";
	$login = $mysql::select('row', $sql, $github_username);
	if (empty($login)) {
		return false;
	}
	
	return new static($login['id']);
}
545677
public static function user_competency_cancel_review_request($userid, $competencyid) {
        static::require_enabled();
        $context = context_user::instance($userid);
        $uc = user_competency::get_record(array('userid' => $userid, 'competencyid' => $competencyid));
        if (!$uc || !$uc->can_read()) {
            throw new required_capability_exception($context, 'moodle/competency:usercompetencyview', 'nopermissions', '');
        } else if ($uc->get('status') != user_competency::STATUS_WAITING_FOR_REVIEW) {
            throw new coding_exception('The competency can not be cancel review request at this stage.');
        } else if (!$uc->can_request_review()) {
            throw new required_capability_exception($context, 'moodle/competency:usercompetencyrequestreview', 'nopermissions', '');
        }

        $uc->set('status', user_competency::STATUS_IDLE);
        $result = $uc->update();
        if ($result) {
            \core\event\competency_user_competency_review_request_cancelled::create_from_user_competency($uc)->trigger();
        }
        return $result;
    }
209589
public function remove($username, $repository, $reference)
    {
        $reference = $this->encodeReference($reference);

        return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference);
    }
1095846
public function createComment($owner, $repo, $issue, $body)
	{
		$data = array();
		$data['body'] = $body;
		
		return $this->client->request("/repos/$owner/$repo/issues/$issue/comments", 'POST', json_encode($data), 201, 'GitHubIssueComment');
	}
687096
public static function pick(Repository $repository, $treeish = null)
    {
        $commit = new self($repository, $treeish);
        $commit->createFromCommand();

        return $commit;
    }