{"id":23739110,"url":"https://github.com/rocaz/aggregategithubcommits","last_synced_at":"2026-05-17T09:36:05.445Z","repository":{"id":57408564,"uuid":"275796806","full_name":"rocaz/aggregateGithubCommits","owner":"rocaz","description":"Aggregate Github commits by author and time.","archived":false,"fork":false,"pushed_at":"2020-08-05T11:47:10.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T05:55:44.481Z","etag":null,"topics":["aggregation","commits","github","github-api","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-29T11:40:18.000Z","updated_at":"2021-02-22T14:51:49.000Z","dependencies_parsed_at":"2022-09-13T04:50:36.870Z","dependency_job_id":null,"html_url":"https://github.com/rocaz/aggregateGithubCommits","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocaz%2FaggregateGithubCommits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocaz%2FaggregateGithubCommits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocaz%2FaggregateGithubCommits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocaz%2FaggregateGithubCommits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocaz","download_url":"https://codeload.github.com/rocaz/aggregateGithubCommits/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239879312,"owners_count":19712180,"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","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":["aggregation","commits","github","github-api","python","python3"],"created_at":"2024-12-31T09:21:21.722Z","updated_at":"2025-10-26T13:18:03.514Z","avatar_url":"https://github.com/rocaz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aggregateGithubCommits\n\nAggregate Github commit count by author and time.\n\n[![Python: 3.7+](https://img.shields.io/badge/Python-3.7+-4584b6.svg?style=popout\u0026logo=python)](https://www.python.org/) ![PyPI](https://img.shields.io/pypi/v/aggregateGithubCommits)\n\n[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)\n\n![GitHub Actions](https://github.com/rocaz/aggregateGithubCommits/workflows/GitHub%20Actions/badge.svg) [![codecov](https://codecov.io/gh/rocaz/aggregateGithubCommits/branch/master/graph/badge.svg)](https://codecov.io/gh/rocaz/aggregateGithubCommits)\n\n## Requirement\n\n- Python 3.7+\n- Your own GitHub account\n\n## Install\n\n```\npip install aggregateGithubCommits\n```\n\nor\n\n```\npip install git+https://github.com/rocaz/aggregateGithubCommits\n```\n\n## Usage\n\naggregateGithubCommits [-h] -r|--repo REPO [-a|--author AUTHOR] [-s|since SINCE]\n                                 [-u|until UNTIL] [-p|--period {h,d,m,w}] [-t|--term TERM]\n                                 [-f|--format {text,json,csv}] [-v]\n\n-h, --help:                   show this help message and exit\n\n-r REPO, --repo REPO:         [Required] GitHub owner and repositry name. ex)'github/covid-19-repo-data'\n\n-a AUTHOR, --author AUTHOR:   GitHub author name, default is all authors. ex)'github'\n\n-s SINCE, --since SINCE:    since date in ISO format. ex) '2020-07-12'\n\n-u UNTIL, --until UNTIL:    until date in ISO format, default is today. ex)'2020-07-12'\n\n-p {h,d,m,w}, --period {h,d,m,w}:\n                              Aggregating period, default is 'h'.\n                              'h': per hour,'d': per day, 'm': per month, 'w': per day of week\n\n-t TERM, --term TERM:       Aggregating term from until, default is '3m'. '3m' means '3months', '100d' means '100days'\n\n-f {text,json,csv}, --format {text,json,csv}:\n                              Output format type, default is 'text'.\n\n-v, --version:              show program's version number and exit\n\n## Example\n\n(1) Specified author. Default term is from now to 3months ago.\n\n```python ./aggregateGithubCommits.py -r \"github/covid-19-repo-data\" -a gregce```\n\nOutput:\n\n```\nRepository: git://github.com/github/covid-19-repo-data.git\nTotal:      15\n   Author:    gregce\n        Hour    00    01    02    03    04    05    06    07    08    09    10    11    12    13    14    15    16    17    18    19    20    21    22    23\n       Count       2     1     2     1     1     0     2     0     1     2     0     1     1     1     0     0     0     0     0     0     0     0     0     0\n        AuthorTotal:        15\n```\n\n(2) The term is specified from '2020-02-29' to '2020-08-02', Aggregation period is 'per month'.\n\n```python ./aggregateGithubCommits.py -r \"github/covid-19-repo-data\" -p m -u '2020-08-02' -s '2020-02-29'```\n\nOutput:\n\n```\nRepository: git://github.com/github/covid-19-repo-data.git\nTotal:      49\n   Author:    gregce\n       Month    2020-03  2020-04  2020-05  2020-06  2020-07\n       Count          0        5        4        4        7\n        AuthorTotal:        20\n   Author:    Ashikpaul\n       Month    2020-03  2020-04  2020-05  2020-06  2020-07\n       Count          0        0        0        0        1\n        AuthorTotal:         1\n   Author:    hamelsmu\n       Month    2020-03  2020-04  2020-05  2020-06  2020-07\n       Count          0       22        0        4        0\n        AuthorTotal:        26\n   Author:    github-actions[bot]\n       Month    2020-03  2020-04  2020-05  2020-06  2020-07\n       Count          0        1        0        0        0\n        AuthorTotal:         1\n   Author:    DJedamski\n       Month    2020-03  2020-04  2020-05  2020-06  2020-07\n       Count          1        0        0        0        0\n        AuthorTotal:         1\n```\n\n(3) Output format is setted to JSON.\n\n```python ./aggregateGithubCommits.py -r \"github/covid-19-repo-data\" -f json```\n\n```\n{\"AggregatedCommits\": {\"gregce\": {\"00\": 2, \"01\": 1, \"02\": 2, \"03\": 1, \"04\": 1, \"06\": 2, \"08\": 1, \"09\": 2, \"11\": 1, \"12\": 1, \"13\": 1}, \"Ashikpaul\": {\"00\": 0, \"01\": 0, \"02\": 1, \"03\": 0, \"04\": 0, \"06\": 0, \"08\": 0, \"09\": 0, \"11\": 0, \"12\": 0, \"13\": 0}, \"hamelsmu\": {\"00\": 0, \"01\": 0, \"02\": 4, \"03\": 0, \"04\": 0, \"06\": 0, \"08\": 0, \"09\": 0, \"11\": 0, \"12\": 0, \"13\": 0}}, \"Period\": \"h\", \"CommitCount\": 20, \"Authors\": [\"gregce\", \"Ashikpaul\", \"hamelsmu\"], \"Indexes\": [\"00\", \"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\", \"13\", \"14\", \"15\", \"16\", \"17\", \"18\", \"19\", \"20\", \"21\", \"22\", \"23\"]}\n```\n\n(4) Output format is setted to CSV.\n\n```python ./aggregateGithubCommits.py -r \"github/covid-19-repo-data\" -f csv```\n\n```\n\"\",\"00\",\"01\",\"02\",\"03\",\"04\",\"05\",\"06\",\"07\",\"08\",\"09\",\"10\",\"11\",\"12\",\"13\",\"14\",\"15\",\"16\",\"17\",\"18\",\"19\",\"20\",\"21\",\"22\",\"23\"\n\"gregce\",\"2\",\"1\",\"2\",\"1\",\"1\",\"0\",\"2\",\"0\",\"1\",\"2\",\"0\",\"1\",\"1\",\"1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"\n\"Ashikpaul\",\"0\",\"0\",\"1\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"\n\"hamelsmu\",\"0\",\"0\",\"4\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\",\"0\"\n```\n\n## Environment Variable\n\n'GITHUBTOKEN'\n\nPlase set your Github Token\n\n## License\n\nCC BY-NC-SA 4.0\n\n[![License: CC BY-NC-SA 4.0](https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png)](https://creativecommons.org/licenses/by-nc-sa/4.0/)\n\nnon-commercial use only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocaz%2Faggregategithubcommits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocaz%2Faggregategithubcommits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocaz%2Faggregategithubcommits/lists"}