:param sha: Full sha to list the statuses from.
        :return: A defered with the result from GitHub.
192892
def getStatuses(self, repo_user, repo_name, sha):
        
        return self.api.makeRequest(
            ['repos', repo_user, repo_name, 'statuses', sha],
            method='GET')
800854
async def status(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["status"], *args, **kwargs)
334904
def update(self, sha, force=False):
        
        data = {'sha': sha, 'force': force}
        json = self._json(self._patch(self._api, data=dumps(data)), 200)
        if json:
            self._update_(json)
            return True
        return False
1253056
def status(self):
        
        return self.repository._repo.status(self._ctx.p1().node(),
                                            self._ctx.node())
610807
def get_pr_checks(pr: PullRequestDetails) -> Dict[str, Any]:
    
    url = ("https://api.github.com/repos/{}/{}/commits/{}/check-runs"
           "?access_token={}".format(pr.repo.organization,
                                     pr.repo.name,
                                     pr.branch_sha,
                                     pr.repo.access_token))
    response = requests.get(
        url,
        headers={'Accept': 'application/vnd.github.antiope-preview+json'})

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

    return json.JSONDecoder().decode(response.content.decode())
1253305
def patch_ref(self, sha):
        
        uri = "{api}/repos/{origin}/git/refs/heads/{branch}".format(
            api=self.github_api_url,
            origin=self.origin,
            branch=self.master_fork
        )
        data = {
            "sha": sha,
            "force": True
        }
        reply = self.request(
            "PATCH",
            uri,
            data=data
        )
        if reply.status_code == 200:
            dic = json.loads(reply.content.decode("utf-8"))
            return dic["object"]["sha"]
        else:
            dic = json.loads(reply.content.decode("utf-8"))
            return self.ProxyError(
                reply.status_code,
                (dic, "message"),
                step="patch",
                context={
                    "uri": uri,
                    "data": data
                }
            )
369754
def sha_for(revision)
      # note that 'git show-ref' produces easier-to-parse output but it matches
      # both local and remote branch to a simple branch name whereas 'git show'
      # matches at-most-one and requires origin/ for remote branches.
      git_args = ['show', revision].compact
      result = nil
      git_output(git_args).lines.each do |line|
        if matched = COMMIT_SHA1_REGEX.match(line.strip)
          result = matched[1]
          break
        end
      end
      unless result
        raise GitError, 'Unable to locate commit in show output.'
      end
      result
    end
676449
def get_status(
        status):
    
    if status == SUCCESS:
        return 'SUCCESS'
    elif status == FAILED:
        return 'FAILED'
    elif status == ERR:
        return 'ERR'
    elif status == EX:
        return 'EX'
    elif status == NOT_RUN:
        return 'NOT_RUN'
    elif status == INVALID:
        return 'INVALID'
    elif status == NOT_DONE:
        return 'NOT_DONE'
    else:
        return 'unsupported status={}'.format(
            status)
580660
def out_of_date(self):
        """"""
        try:
            latest_remote_sha = self.pr_commits(self.pull_request.refresh(True))[-1].sha
            print("Latest remote sha: {}".format(latest_remote_sha))
            try:
                print("Ratelimit remaining: {}".format(self.github.ratelimit_remaining))
            except Exception:
                print("Failed to look up ratelimit remaining")
            return self.last_sha != latest_remote_sha
        except IndexError:
            return False
124713
def pull_status(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[FLOW_STATUS] if FLOW_STATUS in rsp else None, VERSION_V2:rsp}[self.version()])
        return self.path('pull_status.json').post(param, h, r)
105724
def _post_status(self, state, description):
        
        if self.config.post_status:
            logger.info('Commit statuses enabled')
            if self.config.commit_sha:
                logger.info('Posting {} status to commit SHA {}'.format(state, self.config.commit_sha))
                self.git_client.post_status(
                    state,
                    description,
                    sha=self.config.commit_sha
                )
            else:
                logger.warning('Cannot post commit status because no commit SHA has been '
                               'specified. Either use the --commit-sha CLI argument or '
                               'set the LINTLY_COMMIT_SHA environment variable.')
        else:
            logger.info('Commit statuses disabled')
505800
def status(self):
        
        orig_dict = self._get(self._service_url('status'))
        orig_dict['implementation_version'] = orig_dict.pop('Implementation-Version')
        orig_dict['built_from_git_sha1'] = orig_dict.pop('Built-From-Git-SHA1')
        return Status(orig_dict)
518661
def get_status(self):
    
    self.__update_state()
    if self._state.active:
      return self.RUNNING
    else:
      return self._state.result_status
864056
def set_status(repo_full_name, repo_sha, state, description, target_url)
      options = {
        :description => description.length > 140 ? "#{description[0..136]}..." : description,
        :context => 'build-buddy',
        :target_url => target_url || ''
      }
      @gh_client.create_status(repo_full_name, repo_sha, state.to_s, options)
    end
138446
def get_required_status_checks(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.protection_url + "/required_status_checks"
        )
        return github.RequiredStatusChecks.RequiredStatusChecks(self._requester, headers, data, completed=True)
447995
def status(self, status_id, raise_exception_on_failure=False):
        """"""
        query = {"output": "json", "user_credentials": self.api_key}

        resp = requests.get(
            "%sstatus/%s" % (self._url, status_id), params=query, timeout=self._timeout
        )

        if raise_exception_on_failure and resp.status_code != 200:
            raise DocumentStatusFailure(resp.content, resp.status_code)

        if resp.status_code == 200:
            as_json = json.loads(resp.content)
            if as_json["status"] == "completed":
                as_json["download_key"] = _get_download_key(as_json["download_url"])
            return as_json
        return resp
223951
def base_sha
      default_branch = client.repo(repo)[:default_branch]
      branches.find { |branch| branch[:name] == default_branch }[:commit][:sha]
    end