Skip to content

fitztrev/contributors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

  1. Generate a Github token here with scope read:org. A token is required for increased request limits and the read:org is required to get the member list. Add the token to your environment:

    export GITHUB_TOKEN=ghp_abc123
    export OPENAI_API_KEY=sk-abc123 # optional
  2. Reset data

    rm -f database.sqlite
  3. Fetch the data from Github

    cargo run -- fetch lichess-org 2024-12-01 2024-12-31
  4. Optional: Cleanup the data

    sqlite3 database.sqlite
    
    delete from pull_requests where username in ('dependabot[bot]', 'dependabot-preview[bot]', 'scala-steward');
    delete from pull_requests where title like 'New Crowdin %';
    
    insert into members (username) values ('user1'), ('user2');
    

    Or add a queries.sql file:

    sqlite3 database.sqlite < queries.sql
  5. Format the data

    cargo run -- changelog 2024-12-01 2024-12-31
    cargo run -- summary "Lichess" 2024-12-01 2024-12-31
  6. View the report

    cargo run -- results 2024-12-01 2024-12-31
    cargo run -- serve 9001

    Visit http://localhost:9001

Other Queries

sqlite3 database.sqlite

.tables

Total contributors:

select count(distinct username) from pull_requests;
select count(*) from pull_requests;
select * from pull_requests order by created_at asc limit 10;

select count(distinct username) from pull_requests where created_at >= '2024-01-01' and created_at <= '2024-01-31';
select count(*) from pull_requests where created_at >= '2024-01-01' and created_at <= '2024-01-31';

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •