leeroy/github.py
def get_status(app, repo_config, repo_name, sha):
    """Gets the status of a commit.

    .. note::
        ``repo_name`` might not ever be anything other than
        ``repo_config['github_repo']``.

    :param app: Flask app for leeroy
    :param repo_config: configuration for the repo
    :param repo_name: The name of the owner/repo
    :param sha: SHA for the status we are looking for
    :return: returns json response of status
    """
    url = get_api_url(app, repo_config, github_status_url).format(
        repo_name=repo_name, sha=sha)
    logging.debug("Getting status for %s %s", repo_name, sha)
    s = get_session_for_repo(app, repo_config)
    response = s.get(url)
    if not response.ok:
        raise Exception("Unable to get status: {}".format(response.status_code))
    return response
def get_status(app, repo_config, repo_name, sha):
    """Gets the status of a commit.

    .. note::
        ``repo_name`` might not ever be anything other than
        ``repo_config['github_repo']``.

    :param app: Flask app for leeroy
    :param repo_config: configuration for the repo
    :param repo_name: The name of the owner/repo
    :param sha: SHA for the status we are looking for
    :return: returns json response of status
    """
    url = get_api_url(app, repo_config, github_status_url).format(
        repo_name=repo_name, sha=sha)
    logging.debug("Getting status for %s %s", repo_name, sha)
    s = get_session_for_repo(app, repo_config)
    response = s.get(url)
    if not response.ok:
        raise Exception("Unable to get status: {}".format(response.status_code))
    return response
Gets the status of a commit.

    .. note::
        ``repo_name`` might not ever be anything other than
        ``repo_config['github_repo']``.

    :param app: Flask app for leeroy
    :param repo_config: configuration for the repo
    :param repo_name: The name of the owner/repo
    :param sha: SHA for the status we are looking for
    :return: returns json response of status