Exemplo n.º 1
0
def remote_tags():
    """generator producing a list of all remote tags"""
    url = "%s/git/refs/tags" % get_github_api_url()
    for result in requests.get(url).json():
        ref = result["ref"]
        version = ref.split("/")[-1]
        if version is not None:
            yield version
Exemplo n.º 2
0
def remote_tag(tag):
    """returns the remote entry for the tag from github"""
    url = "%s/git/refs/tags" % get_github_api_url()
    for result in requests.get(url).json():
        try:
            if result["ref"] == "refs/tags/%s" % tag:
                return result
        except TypeError:
            return