{"id":18426148,"url":"https://github.com/wework/we-github-stats","last_synced_at":"2025-04-07T16:32:19.631Z","repository":{"id":56898077,"uuid":"77572394","full_name":"wework/we-github-stats","owner":"wework","description":null,"archived":false,"fork":false,"pushed_at":"2016-12-29T16:12:06.000Z","size":13,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-22T21:25:14.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/wework.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}},"created_at":"2016-12-29T01:27:03.000Z","updated_at":"2020-09-18T12:13:33.000Z","dependencies_parsed_at":"2022-08-20T17:40:42.813Z","dependency_job_id":null,"html_url":"https://github.com/wework/we-github-stats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Fwe-github-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Fwe-github-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Fwe-github-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wework%2Fwe-github-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wework","download_url":"https://codeload.github.com/wework/we-github-stats/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247688098,"owners_count":20979606,"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":[],"created_at":"2024-11-06T05:07:01.550Z","updated_at":"2025-04-07T16:32:19.322Z","avatar_url":"https://github.com/wework.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# We::GitHubStats\n\nPrint some annual stats about your organizations repositories.\n\n- Number of Commits\n- Number of Lines Added\n- Number of Lines Deleted\n\nNothing super fancy, and this isn't tested so don't use it for anything in production. Not sure how you would, but please don't.\n\n## Installation\n\nRun the following:\n\n```\n$ gem install we-github-stats\n```\n\n## Usage\n\nThis gem does everything we need to get the job done, but it’s a little primitive.\n\n```\n$ github_stats -o wework -t super-secret-token\n```\n\nThat will output a table for the repos that are done, count up the totals, and let you know if any are still being calculated by GitHub:\n\n```\nERROR! The following stats are not ready on the GitHub API:\n - wework.github.io\n - we-learn-react\n - we-interview\n - we-js-logger\n - careday-api\n - dotenv-rails-safe\n - careday-app\n - eslint-config-wework\n - we-github-stats\nPlease wait a few minutes and try again. In the meantime, the stats for other repos are...\n\n==== Repositories ====\n+---------------+---------+-------------+---------------+\n| Name          | Commits | Lines Added | Lines Removed |\n+---------------+---------+-------------+---------------+\n| env-universal | 54      | 2358        | -692          |\n+---------------+---------+-------------+---------------+\n==== Total ====\nTotal Commits: 54\nTotal Lines Added: 2358\nTotal Lines Removed: -692\n```\n\nRun a few minutes later, you’ll see:\n\n```\n==== Repositories ====\n+-----------------------+---------+-------------+---------------+\n| Name                  | Commits | Lines Added | Lines Removed |\n+-----------------------+---------+-------------+---------------+\n| wework.github.io      | 27      | 357         | -208          |\n| we-learn-react        | 0       | 0           | 0             |\n| we-interview          | 0       | 0           | 0             |\n| we-js-logger          | 64      | 2914        | -1037         |\n| env-universal         | 54      | 2358        | -692          |\n| careday-api           | 7       | 3223        | -628          |\n| dotenv-rails-safe     | 21      | 737         | -281          |\n| careday-app           | 15      | 1686        | -434          |\n| eslint-config-wework  | 4       | 347         | -3            |\n| we-github-stats       | 2       | 384         | -23           |\n+-----------------------+---------+-------------+---------------+\n==== Total ====\nTotal Commits: 233\nTotal Lines Added: 13166\nTotal Lines Removed: -3375\n```\n\nWant it in CSV? Pass the format parameter:\n\n```\n$ github_stats -o wework -t super-secret-token -f csv\n```\n\nIt’ll give you a header row and a line with these stats for each completed repository. \n\n```\nName, Commits, Lines Added, Lines Removed\nwework.github.io,27,357,-208\nwe-learn-react,0,0,0\nwe-interview,0,0,0\nwe-js-logger,64,2914,-1037\nenv-universal,54,2358,-692\ncareday-api,7,3223,-628\ndotenv-rails-safe,21,737,-281\ncareday-app,15,1686,-434\neslint-config-wework,4,347,-3\nwe-github-stats,2,384,-23\n```\n\n## Development\nRun tests the same as with our apps\n    \n    $ rspec spec\n\n## TODO \n\n1. Handle GitHub API errors instead of [raising a panic](https://github.com/wework/we-github-stats/blob/master/lib/we/github_stats/repository.rb#L34)\n1. Concurrent requests because doing these one at a time is _slow_\n1. Slim out Cli class, as it's handling far too many things\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwework%2Fwe-github-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwework%2Fwe-github-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwework%2Fwe-github-stats/lists"}