-
Generate a Github token here with scope
read:org
. A token is required for increased request limits and theread: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
-
Reset data
rm -f database.sqlite
-
Fetch the data from Github
cargo run -- fetch lichess-org 2024-12-01 2024-12-31
-
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
-
Format the data
cargo run -- changelog 2024-12-01 2024-12-31 cargo run -- summary "Lichess" 2024-12-01 2024-12-31
-
View the report
cargo run -- results 2024-12-01 2024-12-31 cargo run -- serve 9001
Visit http://localhost:9001
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';