A Python script that generates a daily report of all PRs and issues you contributed to in the last week using the GitHub API.
- Install dependencies:
uv sync
-
Create a GitHub Personal Access Token:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Generate new token with
reposcope (orpublic_repoif you only need public repos) - Copy the token
-
Set environment variables:
export GITHUB_TOKEN="your_token_here"
export GITHUB_USERNAME="your_username"
python main.py
The script will display a report showing URLs grouped by day for:
- PRs where you pushed commits
- PRs and issues where you commented
The script:
- Searches for PRs you authored and fetches your commits from the last 7 days
- Searches for PRs and issues where you commented in the last 7 days
- Groups all activity by day with unique URLs
Your token needs:
reposcope for private repositoriespublic_reposcope if you only work with public repositories
github_focus_time.py reports cumulative GitHub tab focus time over the last
days from your Firefox history, grouped by repository:
python github_focus_time.py [/path/to/places.sqlite]
To exclude some URLs from the report, create a config file at either
ghtrack.toml (in the working directory) or ~/.config/ghtrack/config.toml.
See ghtrack.toml.example for the format:
ignore = [
"*://github.com/notifications*",
"*://github.com/settings*",
]ignore is a list of case-insensitive URL glob patterns; any visit whose URL
matches a pattern is excluded.