{"id":22328912,"url":"https://github.com/brikaa/contributions-getter","last_synced_at":"2026-04-15T18:31:30.576Z","repository":{"id":179092251,"uuid":"661079675","full_name":"Brikaa/contributions-getter","owner":"Brikaa","description":"A JavaScript/TypeScript library that gets all of the repositories a user has contributed to since their account's creation","archived":false,"fork":false,"pushed_at":"2023-07-18T15:29:38.000Z","size":274,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T06:43:23.912Z","etag":null,"topics":["github","github-api","javascript","npm","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/contributions-getter","language":"TypeScript","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/Brikaa.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}},"created_at":"2023-07-01T18:13:13.000Z","updated_at":"2023-07-06T09:50:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"e31ddeb3-a048-452d-8c1b-2536d276d747","html_url":"https://github.com/Brikaa/contributions-getter","commit_stats":null,"previous_names":["brikaa/contributions-getter"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Brikaa/contributions-getter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brikaa%2Fcontributions-getter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brikaa%2Fcontributions-getter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brikaa%2Fcontributions-getter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brikaa%2Fcontributions-getter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brikaa","download_url":"https://codeload.github.com/Brikaa/contributions-getter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brikaa%2Fcontributions-getter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31854650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["github","github-api","javascript","npm","npm-package","typescript"],"created_at":"2024-12-04T03:13:46.645Z","updated_at":"2026-04-15T18:31:30.559Z","avatar_url":"https://github.com/Brikaa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# contributions-getter\n\nA JavaScript/TypeScript library that gets all of the GitHub repositories a user has committed in since their account's\ncreation\n\n# Example usage\n\n```typescript\nimport { getContributions } from \"contributions-getter\";\n\nconst contributions = await getContributions(\"github_token\", \"github_username\");\nconsole.log(JSON.stringify(contributions, null, 2));\n```\n\n# Configuration\n\nA third parameter can be supplied, which is the Config object.\nIt can optionally contain:\n\n- `monthsInterval`: the interval of getting the contributions in months (defaults to 12 months).\n\n  \u003e Note that the maximum repositories that can be shown in a certain time interval is 100 repositories, so if you have\n  \u003e contributed to more than that within a time period you may consider decreasing the time period\n\n  \u003e Note that decreasing the time period increases the number of requests that are sent to the GitHub API\n\n- `fetchFn`: the function that is used for sending the requests (defaults to `fetch`). This is mainly used for testing.\n  This function has the same signature as `fetch` except only `json`, `status` and `statusText` are required in the\n  response.\n\n# Example output\n\n```\n[\n  {\n    \"startDate\": \"2022-07-06T08:34:06.813Z\",\n    \"endDate\": \"2023-07-06T07:34:06.813Z\",\n    \"repos\": [\n      {\n        \"commits\": 168,\n        \"description\": \"Usage of principles learnt in the Software Design and Architecture course to create an abstract e-payment system\",\n        \"name\": \"sda-assignment/sda-assignment\",\n        \"primaryLanguage\": \"Java\",\n        \"stars\": 1,\n        \"url\": \"https://github.com/sda-assignment/sda-assignment\",\n        \"commitsUrl\": \"https://github.com/sda-assignment/sda-assignment/commits?author=Brikaa\u0026since=2022-07-06\u0026until=2023-07-07\",\n        \"isPrivate\": false\n      },\n      ...\n    ]\n  },\n  ...\n]\n```\n\n# Used GraphQL query\n\n```graphql\nquery getUser($login: String!, $from: DateTime, $to: DateTime) {\n  user(login: $login) {\n    contributionsCollection(from: $from, to: $to) {\n      commitContributionsByRepository(maxRepositories: 100) {\n        url\n        contributions {\n          totalCount\n        }\n        repository {\n          isPrivate\n          nameWithOwner\n          url\n          description\n          stargazerCount\n          primaryLanguage {\n            name\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n# Testing\n\nCreate a file called `token.txt` in the root of the directory containing your GitHub token\nthen run `npm test` or `npm run coverage`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrikaa%2Fcontributions-getter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrikaa%2Fcontributions-getter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrikaa%2Fcontributions-getter/lists"}