import requests


def github_stars(user, repo, token):
    """Get number of github stars a repo has"""
    url = "https://api.github.com/repos/%s/%s" % (user, repo)
    headers = {"Authorization": "token {}".format(token)}
    data = requests.get(url, headers=headers).json()
    return data.get("stargazers_count", 0)