def METHOD_NAME():
    number = os.environ.get("CIRCLE_PR_NUMBER")
    if not number:
        pr_url = os.environ.get("CIRCLE_PULL_REQUEST", "")
        number = pr_url.split("/")[-1]
    try:
        return int(number)
    except ValueError:
        return 0