This is an old revision of the document!
Community Health
Ratio of contributors from a single company over all contributors Also described as: Maintainers from different companies. Diversity of contributor affiliation.
GHTorrent Database
SELECT count(distinct org_id) as num_organizations, projects.name as project_name, url FROM organization_members join users on organization_members.user_id = users.id join pull_request_history on pull_request_history.actor_id = users.id join pull_requests on pull_request_history.pull_request_id = pull_requests.id join projects on pull_requests.base_repo_id = projects.id WHERE pull_request_history.action = 'opened' group by projects.id
SELECT count(distinct company) as num_companies, projects.name as project_name, url FROM users join pull_request_history on pull_request_history.actor_id = users.id join pull_requests on pull_request_history.pull_request_id = pull_requests.id join projects on pull_requests.base_repo_id = projects.id WHERE pull_request_history.action = 'opened' GROUP BY projects.id
SELECT count(distinct org_id) as num_organizations, projects.name as project_name, url FROM organization_members join users on organization_members.user_id = users.id join pull_request_history on pull_request_history.actor_id = users.id join pull_requests on pull_request_history.pull_request_id = pull_requests.id join projects on pull_requests.base_repo_id = projects.id WHERE pull_request_history.action = 'opened' AND pull_requests.id in (SELECT pull_request_id from pull_request_history where action = 'merged') group by projects.id
Authors of the metric page and authors who made significant changes.