Stargazer is a Python script that fetches information about users who have starred a specific GitHub repository. Importantly, it finds the email addresses of the gazers of a repo, in case you'd like to do some targeted marketing.
- Python 3.6+
requestslibrary (install withpip install requests)
-
Clone this repository or download the
stargazer.pyfile. -
Install the required library:
pip install requests -
(Optional) Set up a GitHub Personal Access Token:
- Create a token at https://github.com/settings/tokens
- Set it as an environment variable:
export GITHUB_TOKEN=your_token_here
Run the script from the command line with the following syntax: python stargazer.py owner/repo [--token YOUR_GITHUB_TOKEN]
- Replace
owner/repowith the GitHub repository you want to analyze (e.g.,microsoft/vscode). - The
--tokenargument is optional if you've set theGITHUB_TOKENenvironment variable.
Example:
python stargazer.py microsoft/vscode --token ghp_your_token_here
Providing your gh_token will allow you to make more requests before getting rate limited by Github.