Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 2.01 KB

total-contributors.md

File metadata and controls

57 lines (45 loc) · 2.01 KB

Total Contributors

1. Description

The total number of contributors over time on any platform.

2. Use Cases

3. Formula

4. Sample Filter and Visualization

GHData

Shows a line graph of the number of contributers by month

Kibble - GitHub

Total Contributors visual

5. Sample Implementations

Kibble - GitHub

First, it grabs all the committers for one or multiple projects.

if not committer_email in people or len(people[committer_email]['name']) < len(commiter_name):
    people[commiter_email] = people[commiter_email] if committer_email in people else {'projects': [git_repo_name]}
    people[committer_email]['name'] = committer_name
    if not git_repo_name in people[commiter_email]['projects']:
        people[commiter_email]['projects'].append(git_repo_name)

Then, it ignores the committers as those are already accounted for and collects all the authors.

if not author_email in people or len(people[author_email]['name']) < len(author_name):
    people[author_email] = people[author_email] if author_email in people else {'projects': [git_repo_name]}
    people[author_email]['name'] = author_name
    if not git_repo_name in people[author_email]['projects']:
        people[author_email]['projects'].append(git_repo_name)
SELECT total_committers.created_at AS "date", MAX(@number_of_committers:=@number_of_committers+1) total_total_committers
FROM (
    SELECT author_id, MIN(DATE(created_at)) created_at
    FROM commits
    WHERE project_id = :repoid
    GROUP BY author_id
    ORDER BY created_at ASC) AS total_committers,
(SELECT @number_of_committers:= 0) AS number_of_committers
GROUP BY DATE(total_committers.created_at)

6. Known Implementations

7. Test Cases (Examples)

8. External References (Literature)