{"id":35881677,"url":"https://github.com/rnckp/github-activity-exporter","last_synced_at":"2026-01-08T18:03:50.661Z","repository":{"id":331257054,"uuid":"1125921405","full_name":"rnckp/github-activity-exporter","owner":"rnckp","description":"Export and analyze your GitHub activity across organizations.","archived":false,"fork":false,"pushed_at":"2025-12-31T17:09:38.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-05T02:34:42.779Z","etag":null,"topics":["commit-history","github","github-analysis","github-analyzer","notebook","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rnckp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-31T16:41:31.000Z","updated_at":"2025-12-31T17:09:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rnckp/github-activity-exporter","commit_stats":null,"previous_names":["rnckp/github-activity-exporter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rnckp/github-activity-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnckp%2Fgithub-activity-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnckp%2Fgithub-activity-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnckp%2Fgithub-activity-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnckp%2Fgithub-activity-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rnckp","download_url":"https://codeload.github.com/rnckp/github-activity-exporter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rnckp%2Fgithub-activity-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28247284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-08T02:00:06.591Z","response_time":241,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commit-history","github","github-analysis","github-analyzer","notebook","python"],"created_at":"2026-01-08T18:01:18.141Z","updated_at":"2026-01-08T18:03:50.654Z","avatar_url":"https://github.com/rnckp.png","language":"Jupyter Notebook","readme":"# GitHub Activity Exporter and Analyzer\n\n**Export and analyze your GitHub activity across organizations.**\n\n[![Python](https://img.shields.io/badge/python-v3.11+-blue.svg)](https://github.com/rnckp/github-activity-exporter)\n![GitHub License](https://img.shields.io/github/license/rnckp/github-activity-exporter)\n[![GitHub Stars](https://img.shields.io/github/stars/rnckp/github-activity-exporter.svg)](https://github.com/rnckp/github-activity-exporter/stargazers)\n\u003ca href=\"https://github.com/astral-sh/ruff\"\u003e\u003cimg alt=\"linting - Ruff\" class=\"off-glb\" loading=\"lazy\" src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\"\u003e\u003c/a\u003e\n\n## What It Does\n\n1. `01_get_activity.py` — Fetches your GitHub activity via API and exports to CSV/JSON\n2. `02_explore_activity.ipynb` — Jupyter notebook for visualizing and analyzing the data\n\n### Activity Types Collected\n\n| Kind            | Description                     |\n| --------------- | ------------------------------- |\n| `commits`       | Your commits (default branches) |\n| `prs_opened`    | PRs you created                 |\n| `prs_merged`    | PRs you merged                  |\n| `prs_reviewed`  | PRs you reviewed                |\n| `prs_commented` | PRs you commented on            |\n| `issues_opened` | Issues you created              |\n| `involves_me`   | Issues/PRs involving you        |\n\n## Installation\n\n```bash\ngit clone https://github.com/rnckp/github-activity.git\ncd github-activity\n\npip3 install uv\nuv venv\nuv sync\n```\n\n## GitHub Token Setup\n\n1. Go to [GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)](https://github.com/settings/tokens)\n2. Click **\"Generate new token\"**\n3. Set name and expiration\n4. **Required permissions:**\n\n   - `repo` — Access repository data\n   - `user -\u003e read:user` — Read ALL user profile data\n\n5. Copy the token\n\n```bash\nexport GITHUB_TOKEN=\"github_pat_...\"\n```\n\n## Usage\n\n### Export Activity\n\n```bash\n# Default: rolling last 365 days, all orgs you're a member of\nuv run 01_get_activity.py\n\n# Custom date range\nuv run 01_get_activity.py --from 2025-01-01 --to 2025-12-31\n\n# Specific organization(s)\nuv run 01_get_activity.py --org my-org --org another-org\n\n# Custom output prefix\nuv run 01_get_activity.py --out my_activity\n```\n\n**Output:** `github_activity_YYYY-MM-DD_YYYY-MM-DD.csv` and `.json`\n\n### Analyze Activity\n\nOpen `02_explore_activity.ipynb` in Jupyter/VS Code. The notebook provides:\n\n- Activity type distribution\n- Top repositories by commits\n- Monthly/weekly/hourly commit patterns\n- Day-of-week heatmaps\n- Commit message analysis\n- Organization breakdown\n\n## Troubleshooting\n\n| Issue                     | Solution                                                                     |\n| ------------------------- | ---------------------------------------------------------------------------- |\n| `ERROR: set GITHUB_TOKEN` | Export your token: `export GITHUB_TOKEN=\"...\"`                               |\n| `403 Forbidden`           | Token lacks required permissions. Regenerate with `read:org` + `repo`        |\n| `404 Not Found` on org    | You're not a member, or token doesn't have access to that org                |\n| Rate limit hit            | Script auto-waits. For large exports, run during off-peak hours              |\n| Empty results             | Check date range. Verify org membership with `gh api /user/memberships/orgs` |\n| Missing commits           | Only default branch commits are indexed by GitHub Search API                 |\n\n### Verify Token and Access\n\n**Verify the token is being used and identify the login.**\n\nRun these two calls and ensure you get your expected username back:\n\n```bash\ncurl -sS -H \"Authorization: Bearer $GITHUB_TOKEN\" \\\n  -H \"Accept: application/vnd.github+json\" \\\n  https://api.github.com/user | jq -r .login\n\ncurl -i -sS -H \"Authorization: Bearer $GITHUB_TOKEN\" \\\n  -H \"Accept: application/vnd.github+json\" \\\n  https://api.github.com/rate_limit | head\n```\n\nIf `/user` doesn’t return your login, the script will search for the wrong user and likely get zero hits.\n\n**Debug the org discovery (this is the most common “empty output” cause).**\n\nTry both endpoints manually:\n\n```bash\n# Membership objects (active/pending) for the authenticated user\ncurl -sS -H \"Authorization: Bearer $GITHUB_TOKEN\" \\\n  -H \"Accept: application/vnd.github+json\" \\\n  \"https://api.github.com/user/memberships/orgs?state=active\u0026per_page=100\" | jq '.[].organization.login'\n\n# Orgs for the authenticated user (often simpler)\ncurl -sS -H \"Authorization: Bearer $GITHUB_TOKEN\" \\\n  -H \"Accept: application/vnd.github+json\" \\\n  \"https://api.github.com/user/orgs?per_page=100\" | jq '.[].login'\n```\n\nIf these return empty lists, your token likely lacks `read:org` permission or you are not a member of any orgs.\n\n## Feedback and Contributing\n\nFor feedback or contributions open an issue or pull request.\n\nI use [`ruff`](https://docs.astral.sh/ruff/) for linting and formatting.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnckp%2Fgithub-activity-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnckp%2Fgithub-activity-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnckp%2Fgithub-activity-exporter/lists"}