{"id":16006000,"url":"https://github.com/thibaudcolas/commits-analysis","last_synced_at":"2026-04-15T16:32:15.881Z","repository":{"id":146980824,"uuid":"51309173","full_name":"thibaudcolas/commits-analysis","owner":"thibaudcolas","description":null,"archived":false,"fork":false,"pushed_at":"2016-09-11T19:58:09.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-12T01:06:01.774Z","etag":null,"topics":["git","github","statistical-analysis"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thibaudcolas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-02-08T16:19:41.000Z","updated_at":"2016-02-12T13:22:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"df6d7b7b-7523-4072-ad5a-5c75fe2d057c","html_url":"https://github.com/thibaudcolas/commits-analysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thibaudcolas/commits-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fcommits-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fcommits-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fcommits-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fcommits-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thibaudcolas","download_url":"https://codeload.github.com/thibaudcolas/commits-analysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thibaudcolas%2Fcommits-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31849733,"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":["git","github","statistical-analysis"],"created_at":"2024-10-08T11:22:48.818Z","updated_at":"2026-04-15T16:32:15.864Z","avatar_url":"https://github.com/thibaudcolas.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"commits-analysis\n================\n\n\u003e An analysis of code commits on GitHub over a year.\n\n## Workflow\n\n### 1. Retrieve a list of all of the user's repositories.\n\n\u003eIn this section we are retrieving **all** repositories the user has access to, instead of just the public ones from the account. There are simple, unauthentified API calls to retrieve a list of a user's public repositories.\n\n- Generate a token: https://github.com/settings/tokens\n- Basic auth access: https://developer.github.com/v3/auth/#basic-authentication\n- List your repositories: https://developer.github.com/v3/repos/#list-your-repositories\n- Pagination notes: https://developer.github.com/v3/#pagination\n\nRequired token authorizations:\n\n- `repo` – Full control\n- `read:org` – Read org and team membership\n\n```sh\n# First set your basic auth parameters. Those are kept in a global variable to prevent them being committed anywhere.\nexport GH_AUTH=\"login:token\"\n\ntouch data/repositories.json\n# Start retrieving as many pages as necessary.\ncurl -u $GH_AUTH \"https://api.github.com/user/repos?per_page=100\u0026page=1\" \u003e\u003e data/repositories.json\n# When do you stop? When curl only retrieves a couple of bytes, like:\n#  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n#                                 Dload  Upload   Total   Spent    Left  Speed\n# 100     2  100     2    0     0      2      0  0:00:01 --:--:--  0:00:01     2\n# Concatenate the JSON arrays with sed:\nsed -i -e 's/\\]\\[/,/g' data/repositories.json\nsed -i -e 's/},\\]/}\\]/g' data/repositories.json\n```\n\n### 2. Retrieve commit activity for each repository\n\n- The API endpoint we use: https://developer.github.com/v3/repos/statistics/#get-the-last-year-of-commit-activity-data\n\n```sh\nnode retrieve-stats.js\n# If the fails are empty, run this again multiple times.\n```\n\nThe account to retrieve data for and the type of repository to get can be configured within `retrieve-stats.js`:\n\n```js\nconst USER = 'thibaudcolas';\nconst API_DOMAIN = 'https://api.github.com';\n\nconst allRepos = require('./data/repositories.json');\nconst filteredRepos = _.filter(allRepos, { fork: false, private: false });\n```\n\n### 3. Processing\n\nNow we have the data and it's time to do something with it!\n\n```sh\nnode processing.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibaudcolas%2Fcommits-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthibaudcolas%2Fcommits-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthibaudcolas%2Fcommits-analysis/lists"}