Ejemplo n.º 1
0
def fork(orgrepo):
    """
    Use the API to fork a repository
    """
    api = get_api()
    repo = api.get_repo(orgrepo)
    repo.create_fork()
    repository = orgrepo.split("/", 1)[-1]
    key = f"forked|{repository}"
    set_value(key, "Y")
Ejemplo n.º 2
0
def check_url(url):
    """
    Download and process the
    """
    key = f"github_links|{url}"
    results = get_value(key)
    if results is None:
        results = "\n".join(get_all_markdown_github_links(url))
        set_value(key, results)
    return results.splitlines()
Ejemplo n.º 3
0
def check_forked(orgrepo):
    """
    Check cache to check for an existing fork
    """
    repository = orgrepo.split("/", 1)[-1]
    key = f"forked|{repository}"
    value = get_value(key)
    if value == "Y":
        return True
    result = _check_forked(orgrepo)
    value = "Y" if result else "N"
    set_value(key, value)
    return value == "Y"