GET /repos/:owner/:repo/pulls/:number/comments

        :param pull_number: The pull request's number.
503240
def getPullRequestComments(self, repo_user, repo_name, pull_number):
        
        return self.api.makeRequestAllPages(
            ['repos', repo_user, repo_name,
             'pulls', str(pull_number), 'comments'])
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)
1215945
def repository(self, owner, repository):
        
        json = None
        if owner and repository:
            url = self._build_url('repos', owner, repository)
            json = self._json(self._get(url), 200)
        return Repository(json, self) if json else None
581186
def get_ref(self, branch, origin=None):
        
        if not origin:
            origin = self.origin
        uri = "{api}/repos/{origin}/git/refs/heads/{branch}".format(
            api=self.github_api_url,
            origin=origin,
            branch=branch
        )
        data = self.request("GET", uri)
        if data.status_code == 200:
            data = json.loads(data.content.decode("utf-8"))
            if isinstance(data, list):
                # No addresses matches, we get search results which stars with {branch}
                return False
            #  Otherwise, we get one record
            return data["object"]["sha"]
        elif data.status_code == 404:
            return False
        else:
            decoded_data = json.loads(data.content.decode("utf-8"))
            return self.ProxyError(
                data.status_code, (decoded_data, "message"),
                step="get_ref", context={
                    "uri": uri
                }
            )
1074285
public function createPullRequestComment($repo, $pullId, $commitId, $file, $line, $comment)
    {
        $token = Config::getInstance()->get('phpci.github.token');

        if (!$token) {
            return null;
        }

        $url = '/repos/' . strtolower($repo) . '/pulls/' . $pullId . '/comments';

        $params = array(
            'body' => $comment,
            'commit_id' => $commitId,
            'path' => $file,
            'position' => $line,
        );

        $http = new HttpClient('https://api.github.com');
        $http->setHeaders(array(
            'Content-Type: application/x-www-form-urlencoded',
            'Authorization: Basic ' . base64_encode($token . ':x-oauth-basic'),
        ));

        $http->post($url, json_encode($params));
    }
590455
def get_num_commenters(self, item):
        """"""

        commenters = [comment['user']['login'] for comment in item['comments_data']]
        return len(set(commenters))
722254
def deleteComment(self, repo_user, repo_name, comment_id):
        
        return self.api.makeRequest(
            ["repos", repo_user, repo_name,
             "pulls", "comments", str(comment_id)],
            method="DELETE")
1081180
def commit_comment(self, comment_id):
        
        url = self._build_url('comments', str(comment_id), base_url=self._api)
        json = self._json(self._get(url), 200)
        return RepoComment(json, self) if json else None
1112487
def _get_comments_count(session, group_or_user_id, wall_id):
        
        response = session.fetch("wall.getComments", count=100, owner_id=group_or_user_id, post_id=wall_id)
        return response.get('count')
378263
def pull_requests(self):
        '''
        
        '''
        pr_numbers = re.findall(r"[pP][rR]\s?[0-9]+", self.description)
        pr_numbers += re.findall(re.compile("pull\s?request\s?[0-9]+", re.IGNORECASE), self.description)

        # Remove Duplicates
        pr_numbers = [re.sub('[^0-9]','', p) for p in pr_numbers]
        return pr_numbers
121603
def pull_repo(repo_name):
    """"""
    repo = ClonedRepo.objects.get(pk=repo_name)
    repo.pull()
384642
def post_comment(self, message):
        
        report_url = (
            'https://api.github.com/repos/%s/issues/%s/comments'
            % (self.repo_name, self.pr_number)
        )
        result = self.requester.post(report_url, {'body': message})
        if result.status_code >= 400:
            log.error("Error posting comment to github. %s", result.json())
        return result
767554
def get_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.CommitComment.CommitComment,
            self._requester,
            self.url + "/comments",
            None
        )
1228813
function commentIssue (client, repo, number, comment) {
  return client.createComment(repo, number, comment).then(convertComment);
}
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())
993255
def get_box_comments(self, box_key):
		'''
		'''
		uri = '/'.join([
						self.api_uri,
						self.boxes_suffix,
						box_key,
						self.comments_suffix
						])
		return self._req('get', uri)
1070479
def pull_reply(self, param=None, must=[APIKEY]):
        '''
        '''
        param = {} if param is None else param
        r = self.verify_param(param, must)
        if not r.is_succ():
            return r
        h = CommonResultHandler(lambda rsp: {VERSION_V1:rsp[SMS_REPLY] if SMS_REPLY in rsp else None, VERSION_V2:rsp}[self.version()])
        return self.path('pull_reply.json').post(param, h, r)