Returns the combined status for a branch. umbrella for status checks https://docs.atlassian.com/bitbucket-server/rest/6.0.0/bitbucket-build-rest.html#idp2
505051
async function getBranchStatus(branchName, requiredStatusChecks) {
  logger.debug(
    `getBranchStatus(${branchName}, requiredStatusChecks=${!!requiredStatusChecks})`
  );

  if (!requiredStatusChecks) {
    // null means disable status checks, so it always succeeds
    logger.debug('Status checks disabled = returning "success"');
    return 'success';
  }

  const branchCommit = await config.storage.getBranchCommit(branchName);

  try {
    const commitStatus = (await api.get(
      `./rest/build-status/1.0/commits/stats/${branchCommit}`
    )).body;

    logger.debug({ commitStatus }, 'branch status check result');

    if (commitStatus.failed > 0) return 'failed';
    if (commitStatus.inProgress > 0) return 'pending';
    return commitStatus.successful > 0 ? 'success' : 'pending';
  } catch (err) {
    logger.warn({ err }, `Failed to get branch status`);
    return 'failed';
  }
}
88397
def get_status
      status = @http.aget(PredictionIO::AsyncRequest.new('/')).get
      begin
        status.body
      rescue
        status
      end
    end
950992
def get_status(self):
        '''
        
        '''
        jobs = Job.objects.filter(push=self).filter(
            Q(failure_classification__isnull=True) |
            Q(failure_classification__name='not classified')).exclude(tier=3)

        status_dict = {}
        for (state, result, total) in jobs.values_list(
                'state', 'result').annotate(
                    total=Count('result')):
            if state == 'completed':
                status_dict[result] = total
            else:
                status_dict[state] = total
        if 'superseded' in status_dict:
            # backward compatability for API consumers
            status_dict['coalesced'] = status_dict['superseded']

        return status_dict
920292
def status(DomainName,
             region=None, key=None, keyid=None, profile=None):
    '''
    

    '''

    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    try:
        domain = conn.describe_elasticsearch_domain(DomainName=DomainName)
        if domain and 'DomainStatus' in domain:
            domain = domain.get('DomainStatus', {})
            keys = ('Endpoint', 'Created', 'Deleted',
                    'DomainName', 'DomainId', 'EBSOptions', 'SnapshotOptions',
                    'AccessPolicies', 'Processing', 'AdvancedOptions', 'ARN',
                    'ElasticsearchVersion')
            return {'domain': dict([(k, domain.get(k)) for k in keys if k in domain])}
        else:
            return {'domain': None}
    except ClientError as e:
        return {'error': __utils__['boto3.get_error'](e)}
1253056
def status(self):
        
        return self.repository._repo.status(self._ctx.p1().node(),
                                            self._ctx.node())
351750
def get_branch():
    
    proc = Process("git status", ["git", "status"])

    try:
        while True:
            raw_line = proc.stdout.pop()
            line = raw_line.decode('utf8').strip()
            if line.startswith("On branch "):
                return line[10:]
    finally:
        try:
            proc.join()
        except Exception:
            pass
281674
def status(svc_name=''):
    '''
    
    '''
    cmd = 'monit status'
    res = __salt__['cmd.run'](cmd)
    prostr = 'Process'+' '*28
    s = res.replace('Process', prostr).replace("'", '').split('\n\n')
    entries = {}
    for process in s[1:-1]:
        pro = process.splitlines()
        tmp = {}
        for items in pro:
            key = items[:36].strip()
            tmp[key] = items[35:].strip()
        entries[pro[0].split()[1]] = tmp
    if svc_name == '':
        ret = entries
    else:
        ret = entries.get(svc_name, 'No such service')
    return ret
120620
def get_git_status(git_path='git'):
    
    status_output = subprocess.call((git_path, 'diff-files', '--quiet'))
    if status_output != 0:
        return 'UNCLEAN: Modified working tree'
    else:
        # check index for changes
        status_output = subprocess.call((git_path, 'diff-index', '--cached',
                                         '--quiet', 'HEAD'))
        if status_output != 0:
            return 'UNCLEAN: Modified index'
        else:
            return 'CLEAN: All modifications committed'
989733
def is_merged(self):
        
        url = self._build_url('merge', base_url=self._api)
        return self._boolean(self._get(url), 204, 404)
1107447
def status(self):
        
        config = self._get_config()
        is_hex = lambda name: (len(name) == 4 and
                               all(c in string.hexdigits for c in name))
        out = SimpleNamespace()
        for sect in config:
            for itm in config[sect].values():
                if (itm.readonly or sect == 'status') and not is_hex(itm.name):
                    setattr(out, itm.name, itm.value)
        return out
291307
def get_branch(db, root_hash, key):
    
    validate_is_bytes(key)

    return tuple(_get_branch(db, root_hash, encode_to_bin(key)))
349211
def get_load_status(self):
        
        url, method = self.command_set['daemonstatus'][0], self.command_set['daemonstatus'][1]
        response = http_utils.request(url, method_type=method, return_type=http_utils.RETURN_JSON)
        if response is None:
            logging.warning('%s failure: not found or connection fail' % sys._getframe().f_code.co_name)
            response = DaemonStatus().__dict__
        return response
1260000
def status(commit, ignore: [])
      tree = get_object(commit.tree) unless commit.nil?

      Utils::Status.compare_tree_and_store tree,
                                           staging_area,
                                           object_store,
                                           ignore: ignore
    end
433005
def status(self) -> str:
        
        status: str = self.repo.git.status()
        LOGGER.debug('git status: %s', status)
        return status
800854
async def status(self, *args, **kwargs):
        

        return await self._makeApiCall(self.funcinfo["status"], *args, **kwargs)
1064801
def status(self):
        """"""
        status_request = etcdrpc.StatusRequest()
        status_response = self.maintenancestub.Status(
            status_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )

        for m in self.members:
            if m.id == status_response.leader:
                leader = m
                break
        else:
            # raise exception?
            leader = None

        return Status(status_response.version,
                      status_response.dbSize,
                      leader,
                      status_response.raftIndex,
                      status_response.raftTerm)
574532
def status(self):
        

        rd = self.repo_dir

        logger.debug("pkg path %s", rd)
        if not rd:
            print(
                "unable to find pkg '%s'. %s" % (self.name, did_u_mean(self.name))
            )

        cwd = os.getcwd()
        os.chdir(self.repo_dir)
        logger.debug("cwd: %s, getting status %s ", cwd, self.repo_dir)
        try:
            p = git.status(_out=self._sh_stdout('blue'),
                           _err=self._sh_stderr('red'))
            p.wait()
        except Exception:
            pass
            # logger.warn(e)
        os.chdir(cwd)