get pull request info  by number
321120
def get_pull_request(project, num, auth=False):
    
    url = "https://api.github.com/repos/{project}/pulls/{num}".format(project=project, num=num)
    if auth:
        header = make_auth_header()
    else:
        header = None
    response = requests.get(url, headers=header)
    response.raise_for_status()
    return json.loads(response.text, object_hook=Obj)
781294
def _get_url(method,
             api_url,
             api_version):
    '''
    
    '''
    return '{url}/{version}/{method}.json'.format(url=api_url,
                                                  version=float(api_version),
                                                  method=method)
291864
def get_list(self, datatype, url, **kwargs):
        """"""
        search_url = [url, '?']
        kwargs.update({'key': self.api_key})
        search_url.append(urlencode(kwargs))
        data = json.loads(urlopen(''.join(search_url)).read())
        return data[datatype]
203843
def get(self, **kwargs):
        ""
        kwargs.setdefault('limit', 1)
        return self._first(self.gather(**kwargs))
774972
def get_by_id_or_404(self, id, **kwargs):
        """"""
        obj = self.get_by_id(id=id, **kwargs)

        if obj:
            return obj

        raise Http404
782903
async function getPrFiles(prNo) {
  logger.debug(`getPrFiles(${prNo})`);
  if (!prNo) {
    return [];
  }

  // GET /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/changes
  const values = await utils.accumulateValues(
    `./rest/api/1.0/projects/${config.projectKey}/repos/${
      config.repositorySlug
    }/pull-requests/${prNo}/changes?withComments=false`
  );
  return values.map(f => f.path.toString);
}
1293041
def get_pull_requests_changes(self, project, repository, pull_request_id):
        
        url = 'rest/api/1.0/projects/{project}/repos/{repository}/pull-requests/{pullRequestId}/changes'.format(
            project=project,
            repository=repository,
            pullRequestId=pull_request_id)
        params = {'start': 0}
        response = self.get(url, params=params)
        if 'values' not in response:
            return []
        changes_list = (response or {}).get('values')
        while not response.get('isLastPage'):
            params['start'] = response.get('nextPageStart')
            if params['start'] is None:
                log.warning('Too many changes in pull request. Changes list is incomplete.')
                break
            response = self.get(url, params=params)
            changes_list += (response or {}).get('values')
        return changes_list
414941
def _get_pull_requests(self):
        
        for pull in self.repo.pull_requests(
            state="closed", base=self.github_info["master_branch"], direction="asc"
        ):
            if self._include_pull_request(pull):
                yield pull
1088642
def get_filtered_pull_requests(pull_requests)
      pull_requests = filter_array_by_labels(pull_requests)
      pull_requests = filter_merged_pull_requests(pull_requests)
      puts "Filtered pull requests: #{pull_requests.count}" if options[:verbose]
      pull_requests
    end
472521
async function getPr(prNo) {
  const pr = (await api.get(
    `/2.0/repositories/${config.repository}/pullrequests/${prNo}`
  )).body;

  // istanbul ignore if
  if (!pr) {
    return null;
  }

  const res = {
    displayNumber: `Pull Request #${pr.id}`,
    ...utils.prInfo(pr),
  };

  if (utils.prStates.open.includes(pr.state)) {
    res.isConflicted = await isPrConflicted(prNo);
    const commits = await utils.accumulateValues(pr.links.commits.href);
    if (commits.length === 1) {
      res.canRebase = true;
    }
  }
  if (await branchExists(pr.source.branch.name)) {
    res.isStale = await isBranchStale(pr.source.branch.name);
  }

  return res;
}
518435
function getPullRequestFiles(resource) {
  return github.pullRequests
    .getFiles({
      owner: resource.owner,
      repo: resource.repo,
      number: resource.number,
      per_page: 100
    })
    .then(function(res) {
      return res.data;
    });
}
503240
def getPullRequestComments(self, repo_user, repo_name, pull_number):
        
        return self.api.makeRequestAllPages(
            ['repos', repo_user, repo_name,
             'pulls', str(pull_number), 'comments'])
599848
def get(path, **kwargs):
    """"""
    token = os.environ.get(BE_GITHUB_API_TOKEN)
    if token:
        kwargs["headers"] = {
            "Authorization": "token %s" % token
        }

    try:
        response = requests.get(path, verify=False, **kwargs)
        if response.status_code == 403:
            lib.echo("Patience: You can't pull more than 60 "
                     "presets per hour without an API token.\n"
                     "See https://github.com/mottosso/be/wiki"
                     "/advanced#extended-preset-access")
            sys.exit(lib.USER_ERROR)
        return response
    except Exception as e:
        if self.verbose:
            lib.echo("ERROR: %s" % e)
        else:
            lib.echo("ERROR: Something went wrong. "
                     "See --verbose for more information")
644294
def browse(number)
      request = server.get_request_by_number(number)
      # FIXME: Use request.html_url as soon as we are using our Request model.
      Launchy.open request._links.html.href
    end
1287098
def fetch(path, payload, id_type, id_number)
      request = unsent_request(path, payload)

      if has_id_info? id_type, id_number
       return request.send(id_type, id_number)
      end

      request
    end
433696
def get_pull_request_files(project, num, auth=False):
    """"""
    url = "https://api.github.com/repos/{project}/pulls/{num}/files".format(project=project, num=num)
    if auth:
        header = make_auth_header()
    else:
        header = None
    return get_paged_request(url, headers=header)
1188873
function(move, fn) {
    if (!move || (typeof move !== 'number' &&
        typeof move !== 'string')) {
      return fn('Error getting Move. You did not specify the ' +
        'id number of the move you want to retrieve.');
    }

    move = move.toString();
    var apiCall = 'http://pokeapi.co/api/v' + defaults.version +
      '/move/' + move;

    makeTheCall(move, 'move', apiCall, function(err, data) {
      return fn(err, data);
    });
  }