{"id":22538330,"url":"https://github.com/becomevocal/github-org-language-analyzer","last_synced_at":"2025-07-25T10:36:13.976Z","repository":{"id":266415690,"uuid":"896707149","full_name":"becomevocal/github-org-language-analyzer","owner":"becomevocal","description":"Identify language expertise across an org's developers by analyzing PR contributions and code changes.","archived":false,"fork":false,"pushed_at":"2024-12-01T04:48:24.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T10:34:19.159Z","etag":null,"topics":["analysis","github-organizations","programming-languages"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/becomevocal.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":"2024-12-01T04:48:20.000Z","updated_at":"2024-12-01T04:50:02.000Z","dependencies_parsed_at":"2024-12-04T06:45:38.753Z","dependency_job_id":null,"html_url":"https://github.com/becomevocal/github-org-language-analyzer","commit_stats":null,"previous_names":["becomevocal/github-org-language-analyzer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/becomevocal/github-org-language-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becomevocal%2Fgithub-org-language-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becomevocal%2Fgithub-org-language-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becomevocal%2Fgithub-org-language-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becomevocal%2Fgithub-org-language-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/becomevocal","download_url":"https://codeload.github.com/becomevocal/github-org-language-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/becomevocal%2Fgithub-org-language-analyzer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266991135,"owners_count":24017738,"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":"2025-07-25T02:00:09.625Z","response_time":70,"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":["analysis","github-organizations","programming-languages"],"created_at":"2024-12-07T11:11:27.938Z","updated_at":"2025-07-25T10:36:13.874Z","avatar_url":"https://github.com/becomevocal.png","language":"JavaScript","readme":"# Language Analysis for GitHub Orgs\n\nSimple Node scripts to help identify language expertise across an org's developers by analyzing PR contributions and code changes.\n\nLooks at the previous [x] days of PRs to analyze across all repos in the org. Defaults to 60 days.\n\nWill also pick up contributors outside of the org that are working on org repos, so could be useful for community engagement reporting.\n\n\u003e **Note:** These metrics (lines of code, PR counts) do not necessarily correlate with code quality, impact, or overall contribution value. Some of the most significant contributions might involve removing code, refactoring, or making small but critical changes. **Please don't use anything like this to solely evaluate developer performance!**\n\n## Prerequisites\n\n- Node.js 18+\n- A GitHub personal access token\n\n## Setup\n\n```bash\nnpm install\n```\n\nCreate a `.env` file:\n```\nGITHUB_TOKEN=your_token\nGITHUB_ORG=default_org_name\nNUMBER_OF_DAYS_TO_ANALYZE=60\n```\n\nTo get a token, go to https://github.com/settings/tokens and create a new classic token with the following scopes: `repo`, `read:org`, `read:user`, `read:email`\n\n## Usage\n\n### Step 1: Analyze language usage:\n```bash\nnode analyze-languages.js org_name\n```\n\nThis will create a csv file in the `./output` directory with the year and month you ran the command in the filename.\n\nDepending on the number of repos in your org, this could run for a while and might hit GitHub API rate limits. If it does, just run it again. \n\nThe processed repos are cached in a separate json file so they can be skipped over automatically the next time the command runs.\n\n\u003e Leaving out the org name will use the default org listed in the `.env` file.\n\n### Step 2: Load data into SQLite:\n```bash\nnode load-sqlite.js your_csv_file.csv\n```\n\n\u003e Leaving out the csv file arg will list all the available csv files in the output directory.\n\n### Step 3: Sync org members into SQLite:\n```bash\nnode save-members.js org_name\n```\n\n\u003e Leaving out the org name will use the default org listed in the `.env` file.\n\n### Step 4: Query the database\n\nThe `github_stats.db` file is a SQLite database that contains the following tables: \n- `github_language_stats`\n- `organization_members`\n\nA helpful query to analyze only those contributions that are from within your org is:\n```sql\nSELECT\n    user,\n    name,\n    language,\n    location,\n    sum(lines_added),\n    sum(lines_removed),\n    sum(pr_count) \nFROM \n    github_language_stats\nJOIN\n    organization_members on github_language_stats.user = organization_members.login\nGROUP BY\n    user, language;\n```\n\n\u003e If using VS Code (or compatible IDE), I suggest using the [sqlite3-editor](https://marketplace.visualstudio.com/items?itemName=yy0931.vscode-sqlite3-editor) extension so you can click directly on the DB file to view and query.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecomevocal%2Fgithub-org-language-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbecomevocal%2Fgithub-org-language-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbecomevocal%2Fgithub-org-language-analyzer/lists"}